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

{% set class = 'btn tooltip-link js-delete-customer-row-action' %}

{% if attributes.class is defined %}
  {% set class = class ~ ' ' ~ attributes.class %}
{% endif %}

<a class="{{ class }} grid-{{ action.name|lower }}-row-link"
   href="#"
   data-customer-id="{{ record[action.options.customer_id_field] }}"
   data-customer-delete-url="{{ path(action.options.customer_delete_route) }}"
  {% if attributes.tooltip_name %}
    data-toggle="pstooltip"
    data-placement="top"
    data-original-title="{{ action.name }}"
  {% endif %}
>
  {% if action.icon is not empty %}
    <i class="material-icons">{{ action.icon }}</i>
  {% endif %}
  {% if not attributes.tooltip_name %}
    {{ action.name }}
  {% endif %}
</a>
