import{p as e,H as t,c as s,h as n,t as o}from"./p-Bpcl2TqF.js";import{d as i}from"./p-KvSIaMXJ.js";const c=()=>`.segment{display:flex;align-items:center;justify-content:center;gap:8px;position:relative;border:1px solid #BFBBBB;border-radius:1px;padding:0 8px 0 8px;height:34px;background-color:#FFFFFF;transition:all 100ms ease;transition-property:color, background;font:600 0.875rem/1.25rem "Source Sans 3"}.segment:focus-visible{color:#FFFFFF;background-color:#0A8276}.segment:hover{color:#FFFFFF;background-color:#08665C;cursor:pointer}.segment:active{background-color:#06534B}.segment.segment--selected{color:#FFFFFF;background-color:#0A8276}.segment.segment--small{height:30px}.segment::after{position:absolute;top:0;left:0;width:100%;height:100%;outline:1px solid #BFBBBB;border-radius:1px;content:""}`;const r=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.segmentSelect=s(this,"segmentSelect",5)}segmentSelect;icon;segmentIndex;selected=false;value;handleSegmentClick(){if(this.selected)return;this.selected=true;this.segmentSelect.emit(this.segmentIndex)}handleSegmentKeyDown(e){if(e.code==="Enter"||e.code==="Space"){if(this.selected)return;this.selected=true;this.segmentSelect.emit(this.segmentIndex)}}render(){return n("div",{key:"501802207f563b333ea05773d557a89e4db5b84d",class:`segment ${this.selected?"segment--selected":""}`,tabIndex:0,onClick:()=>{this.handleSegmentClick()},onKeyDown:e=>{this.handleSegmentKeyDown(e)}},n("ifx-icon",{key:"06a1ade81882786d790056f55e63957b72ad24a8",icon:this.icon})," ",n("slot",{key:"ed7cc5061cb6919e4ce41ce6ae75512479d7ee4d"}))}static get style(){return c()}},[769,"ifx-segment",{icon:[1],segmentIndex:[2,"segment-index"],selected:[1028],value:[1]}]);function a(){if(typeof customElements==="undefined"){return}const e=["ifx-segment","ifx-icon"];e.forEach((e=>{switch(e){case"ifx-segment":if(!customElements.get(o(e))){customElements.define(o(e),r)}break;case"ifx-icon":if(!customElements.get(o(e))){i()}break}}))}const l=r;const d=a;export{l as IfxSegment,d as defineCustomElement};
//# sourceMappingURL=ifx-segment.js.map