<% packages.forEach((item) => {
  const id = String(item._id || item.id || '');
  const active = item.presentation.active;
  const name = item.name?.[lang] || item.name?.ar || item.name?.en || '—';
  const description = item.description?.[lang] || item.description?.ar || item.description?.en || '';
%>
  <article class="cc-row" id="tr<%= id %>" data-cc-id="<%= id %>">
    <div class="cc-row__identity">
      <span class="cc-avatar"><i class="ti ti-diamond" aria-hidden="true"></i></span>
      <div class="cc-row__copy">
        <span class="cc-row__kicker"><%= i18n.__('catalogCommerce.featuredPackage') %></span>
        <h2><%= name %></h2>
        <p><%= description || '—' %></p>
      </div>
    </div>
    <div class="cc-row__facts">
      <span class="cc-fact"><small><%= i18n.__('premiumPackages.price') %></small><strong><%= item.price %> <%= i18n.__('common.currency') %></strong></span>
      <span class="cc-fact"><small><%= i18n.__('premiumPackages.duration') %></small><strong><%= item.duration %> <%= i18n.__(`premiumPackages.${item.type}`) %></strong></span>
      <span class="cc-fact"><small><%= i18n.__('common.status') %></small><strong><span class="cc-status cc-status--<%= active ? 'active' : 'inactive' %>"><%= active ? i18n.__('common.active') : i18n.__('common.inActive') %></span></strong></span>
      <span class="cc-fact"><small><%= i18n.__('premiumPackages.type') %></small><strong><%= i18n.__(`premiumPackages.${item.type}`) %></strong></span>
      <span class="cc-fact"><small><%= i18n.__('premiumPackages.userType') %></small><strong><%= i18n.__('premiumPackages.provider') %></strong></span>
      <span class="cc-fact"><small><%= i18n.__('common.date') %></small><strong><%= item.createdAt ? moment(item.createdAt).locale(lang).format('YYYY/MM/DD') : '—' %></strong></span>
    </div>
    <div class="cc-row__actions">
      <a class="cc-action" href="/dashboard/premiumPackages/show/<%= id %>" title="<%= i18n.__('common.show') %>"><i class="ti ti-eye"></i></a>
      <a class="cc-action" href="/dashboard/premiumPackages/edit/<%= id %>" title="<%= i18n.__('common.edit') %>"><i class="ti ti-edit"></i></a>
      <button class="cc-action cc-action--danger" type="button" data-cc-action="delete" data-method="DELETE"
        data-id="<%= id %>" data-url="/dashboard/premiumPackages/delete"
        data-confirm-message="<%= i18n.__('catalogCommerce.featuredPackageDeleteConfirmation') %>"
        title="<%= i18n.__('common.delete') %>"><i class="ti ti-trash"></i></button>
    </div>
  </article>
<% }) %>
