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:"f3a773ae3dec02fd61ae08b2f8db4ea6019b860e"},h("nav",{key:"c7dda1a4eb6ccc9367ff3e11379fbf78170b4ed6",part:"base",class:"breadcrumb","aria-label":this.label},h("slot",{key:"e776e91b492658ba252f94df00f8693da587c84c",onSlotchange:()=>this.handleSlotChange()})),h("div",{key:"7621cc453369d38647299e30eb2a9f5f3fdc5d8c",part:"separator",hidden:!0,"aria-hidden":"true"},h("slot",{key:"2cc02d684909e8a9d443bf1003131dd827841227",name:"separator"},h("sc-icon",{key:"25cc937dac95fedb4d8d7374226eec6c1847c036",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};