import{proxyCustomElement,HTMLElement,h,Fragment}from"@stencil/core/internal/client";import{d as defineCustomElement$2}from"./sc-icon2.js";const scBreadcrumbsCss=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap}",ScBreadcrumbsStyle0=scBreadcrumbsCss,ScBreadcrumbs$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.label="Breadcrumb"}getSeparator(){const e=this.el.shadowRoot.querySelector("slot[name=separator]").assignedElements({flatten:!0})[0].cloneNode(!0);return[e,...e.querySelectorAll("[id]")].forEach((e=>e.removeAttribute("id"))),e.slot="separator",e}handleSlotChange(){const e=this.el.shadowRoot.querySelector(".breadcrumb slot").assignedElements().filter((e=>"CE-BREADCRUMB"===e.nodeName));e.forEach(((t,r)=>{null===t.querySelector('[slot="separator"]')&&t.append(this.getSeparator()),r===e.length-1?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current")}))}render(){return h(Fragment,{key:"f33708c21b9951084724cd207b13a3ef14f70420"},h("nav",{key:"ef776f07eec4d5a2e754a7895c6e43308d02b7b7",part:"base",class:"breadcrumb","aria-label":this.label},h("slot",{key:"8c4efc22225ef46e2c423bae78d9396067ef08bb",onSlotchange:()=>this.handleSlotChange()})),h("div",{key:"109e7ec38dc3d0a598f473d5422ab4dfb5d134b2",part:"separator",hidden:!0,"aria-hidden":"true"},h("slot",{key:"a663890c8aa67f710a9818c3d12c0db54348f7ff",name:"separator"},h("sc-icon",{key:"dbb8393d11f1a9f3fe5585e7caf3380e9fb5f2aa",name:"chevron-right"}))))}get el(){return this}static get style(){return ScBreadcrumbsStyle0}},[1,"sc-breadcrumbs",{label:[1]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["sc-breadcrumbs","sc-icon"].forEach((e=>{switch(e){case"sc-breadcrumbs":customElements.get(e)||customElements.define(e,ScBreadcrumbs$1);break;case"sc-icon":customElements.get(e)||defineCustomElement$2()}}))}const ScBreadcrumbs=ScBreadcrumbs$1,defineCustomElement=defineCustomElement$1;export{ScBreadcrumbs,defineCustomElement};