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