import{proxyCustomElement,HTMLElement,h,Fragment}from"@stencil/core/internal/client";import{d as defineCustomElement$2}from"./sc-icon2.js";const scBreadcrumbsCss=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap}",ScBreadcrumbsStyle0=scBreadcrumbsCss,ScBreadcrumbs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.label="Breadcrumb"}getSeparator(){const e=this.el.shadowRoot.querySelector("slot[name=separator]").assignedElements({flatten:!0})[0].cloneNode(!0);return[e,...e.querySelectorAll("[id]")].forEach((e=>e.removeAttribute("id"))),e.slot="separator",e}handleSlotChange(){const e=this.el.shadowRoot.querySelector(".breadcrumb slot").assignedElements().filter((e=>"CE-BREADCRUMB"===e.nodeName));e.forEach(((t,r)=>{null===t.querySelector('[slot="separator"]')&&t.append(this.getSeparator()),r===e.length-1?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current")}))}render(){return h(Fragment,{key:"16084932447058ba595dc36c9df398bf06785ba8"},h("nav",{key:"32fe4729827e5617ab5e55c80569d8843cadc8dd",part:"base",class:"breadcrumb","aria-label":this.label},h("slot",{key:"f64d73849d4f36c46aed04523c582d909d470396",onSlotchange:()=>this.handleSlotChange()})),h("div",{key:"16e8e8872d77279867b413a819b56ac512396dc2",part:"separator",hidden:!0,"aria-hidden":"true"},h("slot",{key:"c5177a9f145a59bc6a3b1be458d3d483055e6795",name:"separator"},h("sc-icon",{key:"13b07f75e354841efd0a7203023cce564799402e",name:"chevron-right"}))))}get el(){return this}static get style(){return ScBreadcrumbsStyle0}},[1,"sc-breadcrumbs",{label:[1]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["sc-breadcrumbs","sc-icon"].forEach((e=>{switch(e){case"sc-breadcrumbs":customElements.get(e)||customElements.define(e,ScBreadcrumbs$1);break;case"sc-icon":customElements.get(e)||defineCustomElement$2()}}))}const ScBreadcrumbs=ScBreadcrumbs$1,defineCustomElement=defineCustomElement$1;export{ScBreadcrumbs,defineCustomElement};