import{r as e,h as a,F as r,a as t}from"./p-9add63ef.js";const c=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap}";const s=c;const d=class{constructor(a){e(this,a);this.label="Breadcrumb"}getSeparator(){const e=this.el.shadowRoot.querySelector("slot[name=separator]");const a=e.assignedElements({flatten:true})[0];const r=a.cloneNode(true);[r,...r.querySelectorAll("[id]")].forEach((e=>e.removeAttribute("id")));r.slot="separator";return r}handleSlotChange(){const e=this.el.shadowRoot.querySelector(".breadcrumb slot");const a=e.assignedElements().filter((e=>e.nodeName==="CE-BREADCRUMB"));a.forEach(((e,r)=>{const t=e.querySelector('[slot="separator"]');if(t===null){e.append(this.getSeparator())}if(r===a.length-1){e.setAttribute("aria-current","page")}else{e.removeAttribute("aria-current")}}))}render(){return a(r,{key:"f3a773ae3dec02fd61ae08b2f8db4ea6019b860e"},a("nav",{key:"c7dda1a4eb6ccc9367ff3e11379fbf78170b4ed6",part:"base",class:"breadcrumb","aria-label":this.label},a("slot",{key:"e776e91b492658ba252f94df00f8693da587c84c",onSlotchange:()=>this.handleSlotChange()})),a("div",{key:"7621cc453369d38647299e30eb2a9f5f3fdc5d8c",part:"separator",hidden:true,"aria-hidden":"true"},a("slot",{key:"2cc02d684909e8a9d443bf1003131dd827841227",name:"separator"},a("sc-icon",{key:"25cc937dac95fedb4d8d7374226eec6c1847c036",name:"chevron-right"}))))}get el(){return t(this)}};d.style=s;export{d as sc_breadcrumbs};
//# sourceMappingURL=p-9af166cc.entry.js.map