import e from"../../node_modules/lodash/isNil.js";import r from"react";import t from"../../node_modules/@phosphor-icons/react/dist/icons/ArrowLeft.es.js";import"../../node_modules/classnames/index.js";import o from"../Anchor/Anchor.js";import m from"../Box/Box.js";import a from"../Stack/Stack.js";import n from"../Text/Text.js";import s from"./BreadcrumbSeparator.js";import c from"./BreadcrumbSubItem.js";import{withEllipsis as i}from"../../utils/stringUtils.js";const l=({items:l,showIcon:p=!1})=>r.createElement(a,{alignItems:"center",marginY:2,row:!0,wrap:!0},l.map((({name:d,names:f,...g},u)=>{const j=u===l.length-1,E=!e(g.href)||!e(g.onClick),h=E?o:r.Fragment,b=E?{"aria-label":`Breadcrumb-${d??u}`,dark:E,...g}:{};return r.createElement(r.Fragment,{key:`Breadcrumb-${u}`},r.createElement(h,{...b},r.createElement(a,{alignItems:"center",row:!0},p&&0===u&&r.createElement(t,{color:"black",size:1}),r.createElement(m,{paddingLeft:1,paddingTop:1},r.createElement(n,{component:"div",legacyColor:E?"black":void 0,light:!E,nowrap:!0,size:3},d&&i(d,40),f&&r.createElement(c,{names:f}))))),!j&&r.createElement(m,{paddingTop:1},r.createElement(s,null)))})));export{l as default};
//# sourceMappingURL=Breadcrumb.js.map
