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