import{__decorate as e}from"tslib";import{html as t}from"lit";import{customElement as s}from"lit/decorators.js";import{s as i}from"./nile-breadcrumb.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let l=class extends r{static get styles(){return[i]}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.changeLastItem()}))}changeLastItem(){const e=[...this.querySelectorAll("nile-breadcrumb-item")],t=e.length;for(let s=0;s<t-1;s++){e[s].isLast=!1}e[t-1].isLast=!0}handleRemoveClick(e){this.emit("nile-click",{value:e.target.innerText})}render(){return t`
      <slot
        @slotchange=${this.changeLastItem}
        @nile-click-item=${this.handleRemoveClick}
        class="breadcrumb"
      ></slot>
    `}};l=e([s("nile-breadcrumb")],l);export{l as N};
