import{r as e,h as a,F as r,a as t}from"./p-e97fde0a.js";const s=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap}";const c=s;const n=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:"f33708c21b9951084724cd207b13a3ef14f70420"},a("nav",{key:"ef776f07eec4d5a2e754a7895c6e43308d02b7b7",part:"base",class:"breadcrumb","aria-label":this.label},a("slot",{key:"8c4efc22225ef46e2c423bae78d9396067ef08bb",onSlotchange:()=>this.handleSlotChange()})),a("div",{key:"109e7ec38dc3d0a598f473d5422ab4dfb5d134b2",part:"separator",hidden:true,"aria-hidden":"true"},a("slot",{key:"a663890c8aa67f710a9818c3d12c0db54348f7ff",name:"separator"},a("sc-icon",{key:"dbb8393d11f1a9f3fe5585e7caf3380e9fb5f2aa",name:"chevron-right"}))))}get el(){return t(this)}};n.style=c;export{n as sc_breadcrumbs};
//# sourceMappingURL=p-197cfbf5.entry.js.map