import{j as r,r as y}from"./iframe-B8FSoBNY.js";import{c as I}from"./compiler-runtime-BXE7OOXE.js";import{c as S}from"./create-slot-recipe-context-DAhDE6G_.js";import{C as v,E as w}from"./icons-WRA1cA-W.js";import{I as L}from"./icon-C8FN9JqD.js";import{C as P}from"./chevron-right-owK1wZnx.js";import{B as T}from"./index-B0y2_lLF.js";import"./preload-helper-PPVm8Dsz.js";import"./factory-DAJZwK4o.js";import"./create-recipe-context-BU56IzEo.js";import"./createLucideIcon-CcBBUKX8.js";const{withProvider:E,withContext:p}=S({key:"breadcrumb"}),q=E("nav","root",{defaultProps:{"aria-label":"breadcrumb"}}),N=p("ol","list"),_=p("li","item"),h=p("a","link"),D=p("span","currentLink",{defaultProps:{role:"link","aria-current":"page"}}),G=p("li","separator",{defaultProps:{"aria-hidden":!0,children:r.jsx(v,{})}});p("li","ellipsis",{defaultProps:{role:"presentation","aria-hidden":!0,children:r.jsx(w,{})}});const k=y.forwardRef(function(b,g){const e=I.c(21);let o,a,n,s,i;e[0]!==b?({separator:s,separatorGap:i,items:a,linkComponent:o,...n}=b,e[0]=b,e[1]=o,e[2]=a,e[3]=n,e[4]=s,e[5]=i):(o=e[1],a=e[2],n=e[3],s=e[4],i=e[5]);let c;if(e[6]!==o||e[7]!==a||e[8]!==s){let u;e[10]!==o||e[11]!==a.length||e[12]!==s?(u=(t,j)=>{const B=j===a.length-1,R=!!(t.url||t.onClick);let d;return B&&!R?d=r.jsx(D,{children:t.title}):t.url?d=o?r.jsx(h,{asChild:!0,children:r.jsx(o,{to:t.url,children:t.title})}):r.jsx(h,{href:t.url,children:t.title}):t.onClick?d=r.jsx(h,{as:"button",type:"button",onClick:t.onClick,children:t.title}):d=r.jsx(h,{children:t.title}),r.jsxs(_,{children:[d,B?null:r.jsx(G,{as:"span","aria-hidden":!0,ml:"xs",children:s})]},j)},e[10]=o,e[11]=a.length,e[12]=s,e[13]=u):u=e[13],c=a.map(u),e[6]=o,e[7]=a,e[8]=s,e[9]=c}else c=e[9];let l;e[14]!==i||e[15]!==c?(l=r.jsx(N,{gap:i,children:c}),e[14]=i,e[15]=c,e[16]=l):l=e[16];let m;return e[17]!==g||e[18]!==n||e[19]!==l?(m=r.jsx(q,{ref:g,...n,children:l}),e[17]=g,e[18]=n,e[19]=l,e[20]=m):m=e[20],m});k.__docgenInfo={description:"",methods:[],displayName:"Breadcrumb",props:{separator:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},separatorGap:{required:!1,tsType:{name:'SystemStyleObject["gap"]',raw:'SystemStyleObject["gap"]'},description:""},items:{required:!0,tsType:{name:"Array",elements:[{name:"BreadcrumbItem"}],raw:"BreadcrumbItem[]"},description:""},linkComponent:{required:!1,tsType:{name:"ReactComponentType",raw:"React.ComponentType<BreadcrumbLinkProps>",elements:[{name:"BreadcrumbLinkProps"}]},description:""}}};const O=[{title:"Dashboard",url:"/"},{title:"Invoices",url:"/invoices"},{title:"Northwind Traders Q4 2024"}],W={title:"Components/Breadcrumb",component:k,decorators:[C=>r.jsx(T,{padding:"sm",background:"bg",children:r.jsx(C,{})})],args:{items:O,separator:"/",separatorGap:"xs"}},f={},x={args:{separator:r.jsx(L,{as:P,boxSize:"12px",color:"fg.muted"})}};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:"{}",...f.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
  args: {
    separator: <Icon as={ChevronRight} boxSize="12px" color="fg.muted" />
  }
}`,...x.parameters?.docs?.source}}};const X=["Default","IconSeparator"];export{f as Default,x as IconSeparator,X as __namedExportsOrder,W as default};
