{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}
{% extends '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit_base.html.twig' %}

{% block catalog_price_rules_widget %}
  <div {{ block('widget_container_attributes') }}>
    <div id="catalog-price-rule-list-container" class="d-none">
      <div id="catalog-price-rules-loading">
        <div class="loading-label">{{ 'Loading catalog price rules'|trans({}, 'Admin.Catalog.Feature') }}</div>
        <div class="spinner spinner-primary"></div>
      </div>
      <table class="table" id="catalog-price-rules-list-table">
        <thead class="thead-default">
        <tr>
          <th>{{ 'ID'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Name'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Currency'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Country'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Group'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Store'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'Discount'|trans({}, 'Admin.Catalog.Feature') }}</th>
          <th>{{ 'Units'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'From'|trans({}, 'Admin.Global') }}</th>
          <th>{{ 'To'|trans({}, 'Admin.Global') }}</th>
          <th></th>
        </tr>
        </thead>
        <tbody>
        {# template rows dynamically generated using javascript #}
        </tbody>
      </table>
      <div class="row justify-content-center" id="catalog-price-rules-pagination">
        {{ include('@PrestaShop/Admin/Common/javascript_pagination.html.twig', {
          limit: 10,
          limitChoices: [10, 20, 50, 100, 300, 1000],
        }) }}
      </div>
      <script type="text/html" id="catalog-price-rule-tr-template">
        <tr>
          <td class="catalog-price-rule-id"></td>
          <td class="name"></td>
          <td class="currency"></td>
          <td class="country"></td>
          <td class="group"></td>
          <td class="shop"></td>
          <td class="impact"></td>
          <td class="from-qty"></td>
          <td class="from"></td>
          <td class="to"></td>
          <td>
            <a
              href=""
              type="button"
              title="{{ 'Edit'|trans({}, 'Admin.Actions') }}"
              class="js-edit-catalog-price-rule-btn btn tooltip-link"><i class="material-icons">edit</i>
            </a>
          </td>
        </tr>
      </script>
    </div>
  </div>
{% endblock %}
