import{__decorate as t}from"../../_virtual/_tslib.js";import'./../../external/@lit/reactive-element/reactive-element.js';import{html as e}from'./../../external/lit-html/lit-html.js';import{LitElement as o}from'./../../external/lit-element/lit-element.js';import{customElement as s}from'./../../external/@lit/reactive-element/decorators/custom-element.js';import{property as i}from'./../../external/@lit/reactive-element/decorators/property.js';import{state as l}from'./../../external/@lit/reactive-element/decorators/state.js';import'./../../external/@lit/reactive-element/decorators/query-assigned-elements.js';import r from"./splitButtonOption.scss.js";let d=class extends o{constructor(){super(...arguments),this.value="",this.selected=!1,this.disabled=!1,this.highlighted=!1,this.text=""}render(){return e`
      <li
        role="option"
        ?highlighted=${this.highlighted}
        ?selected=${this.selected}
        ?disabled=${this.disabled}
        aria-disabled=${this.disabled}
        title=${this.text}
        @click=${t=>this.handleClick(t)}
        @blur=${t=>this.handleBlur(t)}
      >
        <span>
          <slot @slotchange=${t=>this.handleSlotChange(t)}></slot>
        </span>
      </li>
    `}handleSlotChange(t){const e=t.target.assignedNodes({flatten:!0});let o="";for(let t=0;t<e.length;t++)o+=e[t].textContent.trim();this.text=o}handleClick(t){if(this.disabled)return;const e=new CustomEvent("on-action-click",{bubbles:!0,composed:!0,detail:{value:this.value,text:this.text,origEvent:t}});this.dispatchEvent(e)}handleBlur(t){const e=new CustomEvent("on-blur",{bubbles:!0,composed:!0,detail:{origEvent:t}});this.dispatchEvent(e)}};d.styles=r,t([i({type:String})],d.prototype,"value",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),t([i({type:Boolean})],d.prototype,"disabled",void 0),t([l()],d.prototype,"highlighted",void 0),t([l()],d.prototype,"text",void 0),d=t([s("kd-splitbutton-option")],d);export{d as SplitButtonOption};
//# sourceMappingURL=splitButtonOption.js.map
