import{h,Fragment}from"@stencil/core";export class ScBreadcrumbs{constructor(){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:"6d12ffd546c2a2fdda863b2a3831e98111cb9514"},h("nav",{key:"41810cb4dbbd20e59858dcbffa661ed95d6ac255",part:"base",class:"breadcrumb","aria-label":this.label},h("slot",{key:"c7d95a28bb5b449212a476198decc1e841426d29",onSlotchange:()=>this.handleSlotChange()})),h("div",{key:"eefe1e7e3b0df145d34bec7291c0afb68dc2af0f",part:"separator",hidden:!0,"aria-hidden":"true"},h("slot",{key:"67b05db1cd38814a2919e13f18616fbaa4642809",name:"separator"},h("sc-icon",{key:"88a9ef9ae220f348fe2b14b11eaa3e490b14b30a",name:"chevron-right"}))))}static get is(){return"sc-breadcrumbs"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-breadcrumbs.css"]}}static get styleUrls(){return{$:["sc-breadcrumbs.css"]}}static get properties(){return{label:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:"The label to use for the breadcrumb control. This will not be shown, but it will be announced by screen readers and\nother assistive devices."},attribute:"label",reflect:!1,defaultValue:"'Breadcrumb'"}}}static get elementRef(){return"el"}}