<div class="toolbar" data-control="toolbar">
    <a href="<?= Backend::url('winter/redirect/redirects/create'); ?>"
       class="btn btn-primary oc-icon-plus">
        <?= e(trans('winter.redirect::lang.buttons.new_redirect')); ?>
    </a>

    <?php if ((int) \System\Models\LogSetting::get('log_requests') === 1): ?>
        <a href="#"
           class="btn btn-default oc-icon-plus"
           data-control="popup"
           data-size="giant"
           data-handler="onOpenRequestLog"
           data-stripe-load-indicator>
            <?= e(trans('winter.redirect::lang.buttons.from_request_log')); ?>
        </a>
    <?php endif; ?>

    <a class="btn btn-default oc-icon-sort-amount-asc"
       href="<?= Backend::url('winter/redirect/redirects/reorder'); ?>">
        <?= e(trans('winter.redirect::lang.buttons.reorder_redirects')); ?>
    </a>

    <div class="btn-group" id="checkBoxTriggeredButtons">
        <button class="btn btn-default oc-icon-trash-o"
                disabled=""
                onclick="$(this).data('request-data', { checked: $('.control-list').listWidget('getChecked') })"
                data-request="onDelete"
                data-request-confirm="<?= e(trans('winter.redirect::lang.redirect.delete_confirm')); ?>"
                data-trigger-action="enable"
                data-trigger=".control-list input[type=checkbox]"
                data-trigger-condition="checked"
                data-request-success="$('#checkBoxTriggeredButtons button').prop('disabled', true)"
                data-stripe-load-indicator>
            <?= e(trans('winter.redirect::lang.buttons.delete')); ?>
        </button>
        <button class="btn btn-default oc-icon-check-square-o"
                disabled=""
                onclick="$(this).data('request-data', { checked: $('.control-list').listWidget('getChecked') })"
                data-request="onEnable"
                data-trigger-action="enable"
                data-trigger=".control-list input[type=checkbox]"
                data-trigger-condition="checked"
                data-request-success="$('#checkBoxTriggeredButtons button').prop('disabled', true)"
                data-stripe-load-indicator>
            <?= e(trans('winter.redirect::lang.buttons.enable')); ?>
        </button>
        <button class="btn btn-default oc-icon-square-o"
                disabled=""
                onclick="$(this).data('request-data', { checked: $('.control-list').listWidget('getChecked') })"
                data-request="onDisable"
                data-trigger-action="enable"
                data-trigger=".control-list input[type=checkbox]"
                data-trigger-condition="checked"
                data-request-success="$('#checkBoxTriggeredButtons button').prop('disabled', true)"
                data-stripe-load-indicator>
            <?= e(trans('winter.redirect::lang.buttons.disable')); ?>
        </button>
    </div>
    <button class="btn btn-default oc-icon-undo"
            disabled=""
            onclick="$(this).data('request-data', { checked: $('.control-list').listWidget('getChecked') })"
            data-request="onResetStatistics"
            data-trigger-action="enable"
            data-trigger=".control-list input[type=checkbox]"
            data-trigger-condition="checked"
            data-request-success="$('#checkBoxTriggeredButtons button').prop('disabled', true)"
            data-stripe-load-indicator>
        <?= e(trans('winter.redirect::lang.buttons.reset_statistics')); ?>
    </button>
    <button class="btn btn-default oc-icon-ellipsis-h"
            data-control="popup"
            data-handler="onLoadActions"
            data-keyboard="true"
            data-size="small">
        <?= e(trans('winter.redirect::lang.buttons.bulk_actions')); ?>
    </button>
</div>
