<%- include('../catalogCommerce/assets.ejs') %>
<%
  const attributeTotal = typeof totalCount !== 'undefined' ? totalCount : attributes.length;
%>
<main class="cc-console" data-cc-console data-module="attributes"
  data-filter-url="/dashboard/attributes?type=filter" data-csrf="<%= typeof csrfToken !== 'undefined' ? csrfToken : '' %>">
  <%- include('../catalogCommerce/header.ejs', {
    title: i18n.__('attributes.attributes'),
    subtitle: i18n.__('catalogCommerce.attributesSubtitle'),
    icon: 'ti-tags',
    count: attributeTotal,
    createUrl: '/dashboard/attributes/create',
    hasFilters: true,
    tabs: [],
    secondaryLinks: [
      { href: '/dashboard/attributes/sizes', label: i18n.__('attributes.sizes'), icon: 'ti-dimensions' },
      { href: '/dashboard/attributes/colors', label: i18n.__('attributes.colors'), icon: 'ti-palette' }
    ]
  }) %>
  <%- 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.attributesRegistry') %></strong>
      <span><%= i18n.__('catalogCommerce.attributesRegistryDescription') %></span>
    </div>
    <div data-cc-results><%- include('./dataTable.ejs', { attributes, paginationHtml, lang, i18n, moment }) %></div>
  </section>
  <%- include('../catalogCommerce/confirmModal.ejs', { lang }) %>
</main>
