{% set labeled = options.labeled is defined ? options.labeled : true %}

{% if sylius_sm_can(data, options.graph, options.transition) %}
    <form action="{{ path(options.link.route, options.link.parameters) }}" method="post">
        <input type="hidden" name="_csrf_token" value="{{ csrf_token(data.id) }}">
        <input type="hidden" name="_method" value="PUT">
        <button class="ui loadable {{ options.class|default }} {% if labeled %}labeled{% endif %} icon button" type="submit" data-js-disable=".sylius-grid-table-wrapper button, .sylius-grid-table-wrapper a">
            <i class="{{ action.icon }} icon"></i>
            {% if labeled %}{{ action.label|trans }}{% endif %}
        </button>
    </form>
{% endif %}
