"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("@gem-sdk/system"),s=require("./BreadcrumbItem.liquid.js"),a=require("../common/attrs.js"),l=require("../common/classes.js"),r=require("../common/styles.js"),i=require("../types.js"),m=require("../constants.js");exports.default=({setting:p={},builderAttrs:E,style:c,styles:o={},className:T,builderProps:u,advanced:d})=>{let n=[i.ShopifyTemplate.HOME,i.ShopifyTemplate.LANDING,i.ShopifyTemplate.PRODUCT,i.ShopifyTemplate.COLLECTION,i.ShopifyTemplate.ARTICLE],{spacing:S,align:y,background:M}=p??{},_=n.map(e=>s.BreadcrumbItem({lengthOfBreadcrumb:e===i.ShopifyTemplate.HOME?m.SHOPIFY_TEMPLATE_BREADCRUMB_LENGTH.HOME:m.SHOPIFY_TEMPLATE_BREADCRUMB_LENGTH.OTHERS_TEMPLATE,breadcrumbItemIndex:e===i.ShopifyTemplate.HOME?m.SHOPIFY_TEMPLATE_BREADCRUMB_ITEM_INDEX.HOME:m.SHOPIFY_TEMPLATE_BREADCRUMB_ITEM_INDEX.OTHERS_TEMPLATE,templateName:e,setting:p,styles:o})).join(""),A=t.createAttr({...a.getAttr({uid:u?.uid??"",builderAttrs:E})}),O=t.createClass({...l.getBreadcrumbClasses(T),...d?.cssClass&&{[d.cssClass]:!0}}),I=t.createStyle({...r.getBreadcrumbStyles(c,{background:M,align:y})}),L=t.createClass({...l.getNavClasses()}),g=t.createAttr({...a.getNavAttr()}),C=t.createStyle({...e.makeGlobalSize(p?.globalSize).padding,...r.getSpacingStyles(S),...e.makeStyleResponsive("jc",y)});return t.Liquid(e.template`
    <div ${{...A}}
      style="${I}"
      class="${O}">
      ${t.LiquidUnless("template == 'cart' or template == 'list-collections' or template == '404'",e.template`
        ${t.Liquid(`
          {% assign tpl = template %}
          {% if tpl contains '.' %}
            {% assign tpl = tpl | split: '.' | first %}
          {% endif %}
        `)}
        <nav style="${C}" class="${L}" ${{...g}}>
          ${_}
        </nav>
      `)}
  </div>`)};
