'use client';
import{jsx as e}from"react/jsx-runtime";import{useMemo as m}from"react";import{useBreadcrumb as r}from"../hooks/useBreadcrumb.js";import s from"./BreadcrumbItem.js";import{createAttr as t,createStyle as o,createClass as a}from"@gem-sdk/system";import{getAttr as l,getNavAttr as c}from"../common/attrs.js";import{getBreadcrumbStyles as i,getSpacingStyles as n}from"../common/styles.js";import{getBreadcrumbClasses as d,getNavClasses as p}from"../common/classes.js";import{makeStyleResponsive as u,makeGlobalSize as f}from"@gem-sdk/core";let g=({className:g,setting:b={},style:j,styles:h={},builderAttrs:y,builderProps:B,advanced:k})=>{let{background:x,align:I}=b||{},{currentBreadcrumb:N}=r(),v=m(()=>{let m=N.length;return N.length?N.map((r,t)=>e(s,{lengthOfBreadcrumb:m,templateName:r,breadcrumbItemIndex:t,setting:b,styles:h},t)):null},[N,b,h]),C=t({...l({uid:B?.uid??"",builderAttrs:y})}),z=o({...i(j,{background:x,align:I})}),O=a({...d(g),...k?.cssClass&&{[k.cssClass]:!0}}),S=a({...p()}),q=t({...c()}),w=o({...f(b?.globalSize).padding,...n(b?.spacing),...u("jc",I)});return e("div",{...C,style:z,className:O,children:e("nav",{style:w,className:S,...q,children:v})})};export{g as default};
