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 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:"6d12ffd546c2a2fdda863b2a3831e98111cb9514"},a("nav",{key:"41810cb4dbbd20e59858dcbffa661ed95d6ac255",part:"base",class:"breadcrumb","aria-label":this.label},a("slot",{key:"c7d95a28bb5b449212a476198decc1e841426d29",onSlotchange:()=>this.handleSlotChange()})),a("div",{key:"eefe1e7e3b0df145d34bec7291c0afb68dc2af0f",part:"separator",hidden:true,"aria-hidden":"true"},a("slot",{key:"67b05db1cd38814a2919e13f18616fbaa4642809",name:"separator"},a("sc-icon",{key:"88a9ef9ae220f348fe2b14b11eaa3e490b14b30a",name:"chevron-right"}))))}get el(){return t(this)}};d.style=c;export{d as sc_breadcrumbs};
//# sourceMappingURL=p-a2fc9477.entry.js.map