<?php if ($relationViewMode == 'single'): ?>
    <button
        class="btn btn-sm btn-secondary oc-icon-minus"
        data-request="onRelationButtonRemove"
        data-stripe-load-indicator>
        <?= e(trans('backend::lang.relation.remove')) ?>
    </button>
<?php else: ?>
    <button
        class="btn btn-sm btn-secondary oc-icon-minus"
        onclick="$(this).data('request-data', {
            checked: $('#<?= $this->relationGetId('view') ?> .control-list').listWidget('getChecked')
        })"
        disabled="disabled"
        data-request="onRelationButtonRemove"
        data-trigger-action="enable"
        data-trigger="#<?= $this->relationGetId('view') ?> .control-list input[type=checkbox]"
        data-trigger-condition="checked"
        data-stripe-load-indicator>
        <?= e(trans('backend::lang.relation.remove')) ?>
    </button>
<?php endif ?>