import{r as e,c as t,h as s}from"./p-wX3eJOEL.js";const o=class{constructor(s){e(this,s),this.segmentSelect=t(this,"segmentSelect",5)}segmentSelect;icon;segmentIndex;selected=!1;value;handleSegmentClick(){this.selected||(this.selected=!0,this.segmentSelect.emit(this.segmentIndex))}handleSegmentKeyDown(e){if("Enter"===e.code||"Space"===e.code){if(this.selected)return;this.selected=!0,this.segmentSelect.emit(this.segmentIndex)}}render(){return s("div",{key:"fca07da4ca6f793b33a64daf35ad221e3f57c2ac",class:"segment "+(this.selected?"segment--selected":""),tabIndex:0,onClick:()=>{this.handleSegmentClick()},onKeyDown:e=>{this.handleSegmentKeyDown(e)}},s("ifx-icon",{key:"91aba534a87c417ab47c82ff30cbeed2c92b1058",icon:this.icon})," ",s("slot",{key:"623ca7cf551445328ac2d5966737a66a5874567e"}))}};o.style='.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:""}';export{o as ifx_segment}