<%
const linksGroup = locals.linksGroup || {}
const links = linksGroup.links || [];

if (!links.length && linksGroup.groupCount !== undefined) {
  let icon, place;
  for (let i = 0; i < linksGroup.groupCount; i++) {
    switch(i % 3) {
      case 1:
        icon = 'arrow-left-line';
        place = 'left';
        break;

      case 2:
        icon = 'arrow-right-line';
        place = 'right';
        break;
    }


    links.push({
      label: linksGroup.label || 'Libellé lien ' + (i+1),
      href: linksGroup.href || '#',
      markup: linksGroup.markup,
      icon: icon,
      iconPlace: place,
      disabled: linksGroup.disabled,
      attributes: linksGroup.linkAttributes,
      classes: linksGroup.linkClasses,
    });
  }
  linksGroup.links = links;
}
%>

<%- include('../../template/ejs/links-group.ejs', {linksGroup: linksGroup}) %>
