{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}

<button id="{{ '%s_grid_bulk_action_%s'|format(grid.id, action.id) }}"
        class="dropdown-item js-bulk-action-ajax-btn {{ action.options.class }}"
        type="button"
        data-bulk-action="{{ action.id }}"
        data-ajax-url="{{ action.options.ajax_route }}"
        data-route-params="{{ action.options.route_params|json_encode }}"
        data-request-param-name="{{ action.options.request_param_name }}"
        data-request-bulk-chunk-size="{{ action.options.bulk_chunk_size }}"
        data-request-reload-after-bulk="{{ action.options.reload_after_bulk }}"
        data-confirm-bulk-action="{{ action.options.confirm_bulk_action }}"
        data-confirm-title="{{ action.options.modal_confirm_title }}"
        data-cancel-label="{{ action.options.modal_cancel }}"
        data-progress-title="{{ action.options.modal_progress_title }}"
        data-progress-message="{{ action.options.modal_progress_message }}"
        data-close-label="{{ action.options.modal_close }}"
        data-stop-processing="{{ action.options.modal_stop_processing }}"
        data-errors-message="{{ action.options.modal_errors_message }}"
        data-back-to-processing="{{ action.options.modal_back_to_processing }}"
        data-download-error-log="{{ action.options.modal_download_error_log }}"
        data-view-error-log="{{ action.options.modal_view_error_log }}"
        data-view-error-title="{{ action.options.modal_error_title }}"
        {% for attribute, value in action.options.attributes %}
        {{ attribute }}="{{ value }}"
        {% endfor %}
>
  {% if action.icon is not empty %}
    <i class="material-icons">{{ action.icon }}</i>
  {% endif %}
  {{ action.name }}
</button>
