<div data-control="toolbar">
    <a
        href="<?= Backend::url('indikator/news/subscribers/create') ?>"
        class="btn btn-primary oc-icon-plus">
        <?= e(trans('indikator.news::lang.new.subscribers')) ?>
    </a>
    <?php if (Indikator\News\Models\Subscribers::count() > 0): ?>
    <div class="btn-group">
        <button
            class="btn btn-default oc-icon-check"
            disabled="disabled"
            onclick="$(this).data('request-data', {
                checked: $('.control-list').listWidget('getChecked')
            })"
            data-request="onSubscribe"
            data-trigger-action="enable"
            data-trigger=".control-list input[type=checkbox]"
            data-trigger-condition="checked"
            data-stripe-load-indicator>
            <?= e(trans('indikator.news::lang.button.subscribe')) ?>
        </button>
        <button
            class="btn btn-default oc-icon-times"
            disabled="disabled"
            onclick="$(this).data('request-data', {
                checked: $('.control-list').listWidget('getChecked')
            })"
            data-request="onUnsubscribe"
            data-trigger-action="enable"
            data-trigger=".control-list input[type=checkbox]"
            data-trigger-condition="checked"
            data-stripe-load-indicator>
            <?= e(trans('indikator.news::lang.button.unsubscribe')) ?>
        </button>
    </div>
    <button
        class="btn btn-danger oc-icon-trash-o"
        disabled="disabled"
        onclick="$(this).data('request-data', {
            checked: $('.control-list').listWidget('getChecked')
        })"
        data-request="onRemove"
        data-request-confirm="<?= e(trans('indikator.news::lang.flash.delete')) ?>"
        data-trigger-action="enable"
        data-trigger=".control-list input[type=checkbox]"
        data-trigger-condition="checked"
        data-stripe-load-indicator>
        <?= e(trans('backend::lang.list.delete_selected')) ?>
    </button>
    <?php endif ?>
    <?php if ($this->user->hasAccess('indikator.news.import_export')): ?>
    <div class="btn-group">
        <a
            href="<?= Backend::url('indikator/news/subscribers/export') ?>"
            class="btn btn-default oc-icon-download">
            <?= e(trans('indikator.news::lang.button.export')) ?>
        </a>
        <a
            href="<?= Backend::url('indikator/news/subscribers/import') ?>"
            class="btn btn-default oc-icon-upload">
            <?= e(trans('indikator.news::lang.button.import')) ?>
        </a>
    </div>
    <?php endif ?>
</div>
