import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as l}from"./nile-button-toggle.css.esm.js";import{N as o}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 n=class extends o{constructor(){super(...arguments),this.active=!1,this.initial=!1,this.middle=!1,this.end=!1,this.disabled=!1,this.value=""}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.toggle)}disconnectedCallback(){this.removeEventListener("click",this.toggle),super.disconnectedCallback()}toggle(){this.disabled||this.emit("nile-toggle-change",{active:this.active,value:this.value})}render(){let t=["nile-button-toggle"];this.active&&t.push("nile-button-toggle__active"),this.initial&&t.push("nile-button-toggle__initial"),this.middle&&t.push("nile-button-toggle__middle"),this.end&&t.push("nile-button-toggle__end"),this.disabled&&t.push("nile-button-toggle__disabled");const i=t.join(" ");return e`
      <div class="${i} " part="base">
        <slot name="prefix"></slot>
        <slot> </slot>
      </div>
    `}};t([i({type:Boolean,reflect:!0})],n.prototype,"active",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"initial",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"middle",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"end",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),t([i({type:String})],n.prototype,"value",void 0),n=t([s("nile-button-toggle")],n);var r=n;export{r as N,n as a};
