<%- include('../catalogCommerce/assets.ejs') %>
<%
  const countryTotal = typeof totalCount !== 'undefined' ? totalCount : countries.length;
%>
<main class="cc-console" data-cc-console data-module="countries"
  data-filter-url="/dashboard/countries/filter" data-csrf="<%= typeof csrfToken !== 'undefined' ? csrfToken : '' %>">
  <%- include('../catalogCommerce/header.ejs', {
    title: i18n.__('countries.countries'),
    subtitle: i18n.__('catalogCommerce.countriesSubtitle'),
    icon: 'ti-world',
    count: countryTotal,
    createUrl: '/dashboard/countries/create',
    hasFilters: true,
    tabs: [],
    secondaryLinks: [{ href: '/dashboard/cities', label: i18n.__('countries.cities'), icon: 'ti-building' }]
  }) %>
  <%- include('../catalogCommerce/filters.ejs', { filterData, lang, i18n }) %>
  <p class="cc-error" data-cc-error hidden></p>
  <section class="cc-results-shell">
    <div class="cc-results-shell__bar">
      <strong><%= i18n.__('catalogCommerce.countriesRegistry') %></strong>
      <span><%= i18n.__('catalogCommerce.countriesRegistryDescription') %></span>
    </div>
    <div data-cc-results><%- include('./dataTable.ejs', { countries, paginationHtml, lang, i18n, moment }) %></div>
  </section>
  <%- include('../catalogCommerce/confirmModal.ejs', { lang }) %>
</main>
