import{r as e,c as t,h as s}from"./p-Cby2wKoI.js";const o=()=>`.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 n=class{constructor(s){e(this,s);this.segmentSelect=t(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 s("div",{key:"501802207f563b333ea05773d557a89e4db5b84d",class:`segment ${this.selected?"segment--selected":""}`,tabIndex:0,onClick:()=>{this.handleSegmentClick()},onKeyDown:e=>{this.handleSegmentKeyDown(e)}},s("ifx-icon",{key:"06a1ade81882786d790056f55e63957b72ad24a8",icon:this.icon})," ",s("slot",{key:"ed7cc5061cb6919e4ce41ce6ae75512479d7ee4d"}))}};n.style=o();export{n as ifx_segment};
//# sourceMappingURL=p-6a45fb71.entry.js.map