{% extends '@SyliusUi/Macro/buttons.html.twig' %}

{% macro delete(url, message, labeled = true, resourceId = null) %}
    <form action="{{ url }}" method="post">
        <input type="hidden" name="_method" value="DELETE">
        <button class="link-secondary p-0" type="submit" data-requires-confirmation {{ sylius_test_html_attribute('delete-button') }}>
             {{ ((message is empty and labeled) ? 'sylius.ui.delete' : message)|trans }}
        </button>
        <input type="hidden" name="_csrf_token" value="{{ csrf_token(resourceId) }}" />
    </form>
{% endmacro %}
