{# app/modules/loyalty/templates/loyalty/admin/merchant-pins.html #}
{% extends "admin/base.html" %}
{% from 'shared/macros/headers.html' import detail_page_header, refresh_button %}
{% from 'shared/macros/alerts.html' import loading_state, error_state %}

{% block title %}{{ _('loyalty.admin.merchant_pins.title') }}{% endblock %}
{% block i18n_modules %}['loyalty']{% endblock %}
{% block alpine_data %}adminMerchantPins(){% endblock %}

{% block content %}
{% call detail_page_header("'" + _('loyalty.admin.merchant_pins.title') + ": " + (merchant_name or '') + "'", '/admin/loyalty/merchants/' ~ merchant_id, subtitle_show='program') %}
    {{ _('loyalty.admin.merchant_pins.subtitle') }}
{% endcall %}

{{ loading_state(_('loyalty.admin.merchant_pins.loading')) }}
{{ error_state(_('loyalty.admin.merchant_pins.error_loading')) }}

{% set pins_api_prefix = '/admin/loyalty/merchants/' + merchant_id|string %}
{% set show_store_filter = true %}
{% set show_crud = false %}
{% include 'loyalty/shared/pins-list.html' %}
{% endblock %}

{% block extra_scripts %}
<script defer src="{{ url_for('loyalty_static', path='shared/js/loyalty-pins-list.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='admin/js/loyalty-merchant-pins.js') }}"></script>
{% endblock %}
