import{r as e,h as a,F as r,a as t}from"./p-e97fde0a.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:"efed488a3a1f00f843df51343dec5bdee12398fe"},a("nav",{key:"54c3edca833b1b9f629a950b1868807acd36c583",part:"base",class:"breadcrumb","aria-label":this.label},a("slot",{key:"5bd5c9879c27cad98c57458923be5df1c825c05a",onSlotchange:()=>this.handleSlotChange()})),a("div",{key:"3fcdf2ac4a9dde993118ffadbfe06a7390f59820",part:"separator",hidden:true,"aria-hidden":"true"},a("slot",{key:"48f7a92d1a58d4c61de3ac3c21d51ce4c9653afa",name:"separator"},a("sc-icon",{key:"ef3e0fe72189e8bc6a06a81c5be9864b2945fc1d",name:"chevron-right"}))))}get el(){return t(this)}};d.style=s;export{d as sc_breadcrumbs};
//# sourceMappingURL=p-6c3ff741.entry.js.map