"use strict";var home=require("./templates/home.js"),landing=require("./templates/landing.js"),product=require("./templates/product.js"),collection=require("./templates/collection.js"),article=require("./templates/article.js"),styles=require("../common/styles.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const BreadcrumbItem=e=>{let{breadcrumbItemIndex:s,lengthOfBreadcrumb:t,setting:r,styles:a}=e,{fontWeight:l,labelColor:m,hideCurrentPage:c}=r??{},o={home:home.BreadcrumbHomeTemplate,landing:landing.BreadcrumbLadingTemplate,product:product.BreadcrumbProductTemplate,collection:collection.BreadcrumbCollectionTemplate,article:article.BreadcrumbArticleTemplate},d=system.createStyle({...styles.generateBreadcrumbChildIconStyles(r?.iconWidth,r?.color)}),n=system.createStyle({...styles.getBreadcrumbChildItemStyles({breadcrumbItemIndex:s,lengthOfBreadcrumb:t,appendTypoStyle:helpers.composeAppendTypoStyle(a?.typo),fontWeight:l,labelColor:m})}),i=system.createStyle({...styles.getBreadcrumbChildItemStyles({breadcrumbItemIndex:0,lengthOfBreadcrumb:t,appendTypoStyle:helpers.composeAppendTypoStyle(a?.typo),fontWeight:l,labelColor:m})}),p=system.createClass({...classes.getBreadcrumbSecondItemClasses(s,c,t)}),u=system.createClass({...classes.getBreadcrumbContainerChildItemClasses()}),y=system.createClass({...classes.getBreadcrumbChildItemClasses(s,t,helpers.composeAppendTypoClass(a?.typo))}),C=s+1===t&&"home"!==e.templateName,b=system.createClass({...classes.generateBreadcrumbClasses(c,{indexOffset:s??0,lengthOfBreadcrumb:t,extendCondition:C})}),g=()=>C?`${y} ${b}`.trim():y,B=()=>{let e=system.createClass({...classes.generateBreadcrumbClasses(c,{indexOffset:s??0,lengthOfBreadcrumb:t,extendCondition:!0})});return`${y} ${e}`.trim()},h=()=>`${y} ${b}`.trim(),S=()=>{let e=system.createClass({...classes.generateBreadcrumbClasses(c,{indexOffset:s??0,lengthOfBreadcrumb:t,extendCondition:!1})});return`${y} ${e}`.trim()},I=system.createClass({...classes.getBreadcrumbSecondItemClasses(s,{desktop:!1,tablet:!1,mobile:!1},t)}),T=e.templateName?o[e.templateName]({getBreadcrumbChildIconStyles:d,breadcrumbChildItemStyles:n,breadcrumbSecondItemClasses:p,breadcrumbChildItemClasses:y,breadcrumbChildSecondItemStyles:i,breadcrumbContainerChildItemClasses:u,composePageClasses:g(),composeHomePageClasses:B(),composePageSecondClasses:h(),composeSubPageClasses:S(),breadcrumbSubPageIconItemClasses:I,iconSvg:r?.iconSvg}):null;return T};exports.BreadcrumbItem=BreadcrumbItem;
