'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../common/helpers.js"),r=require("@gem-sdk/system"),t=require("../common/styles.js"),a=require("../common/classes.js"),l=require("react");exports.default=c=>{let{breadcrumbItemIndex:o,lengthOfBreadcrumb:n,setting:m,templateName:d,styles:i}=c,{hideCurrentPage:u,labelColor:p,fontWeight:y,iconSvg:C}=m??{},h=r.createClass({...a.getBreadcrumbChildItemClasses(o,n,s.composeAppendTypoClass(i?.typo))}),g=r.createStyle({...t.getBreadcrumbChildItemStyles({breadcrumbItemIndex:o,lengthOfBreadcrumb:n,fontWeight:y,appendTypoStyle:s.composeAppendTypoStyle(i?.typo),labelColor:p})}),j=r.createStyle({...t.generateBreadcrumbChildIconStyles(m?.iconWidth,m?.color)}),x=r.createClass({...a.getBreadcrumbSecondItemClasses(o+1,u,n)}),S=l.useMemo(()=>o+1===n,[o,n]),b=r.createClass({...a.generateBreadcrumbClasses(m?.hideCurrentPage,{extendCondition:S})}),q=l.useMemo(()=>S?`${h} ${b}`.trim():h,[h,b,S]);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:q,style:g,children:e.jsx("span",{children:d})}),r.If(!!(C&&!S),e.jsx("span",{style:j,className:x,dangerouslySetInnerHTML:{__html:C??""}}))]})};
