"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _react = require('react');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var R=_chunk3CNSKST2cjs.a.call(void 0, "EulSegmentedControl",["active","disabled","fullWidth","focusVisible","inner","isSelected","item","root","selected","sizeSmall","sizeMedium","sizeLarge"]),m=e=>_chunk5KRCPBZRcjs.e.call(void 0, "EulSegmentedControl",{inner:["inner",e.isSelected&&"isSelected"],item:["item",e.size&&`size${_chunk3CNSKST2cjs.d.call(void 0, e.size)}`,e.selected&&"selected",e.active&&"active",e.disabled&&"disabled",e.focusVisible&&"focusVisible"],root:["root",e.size&&`size${_chunk3CNSKST2cjs.d.call(void 0, e.size)}`,e.fullWidth&&"fullWidth"]}),o= exports.a =R;var I=_chunk3CNSKST2cjs.m.call(void 0, "button")(({theme:e})=>_chunk5NXYDZPPcjs.p`
    display: flex;
    flex-direction: row;
    gap: ${e.spacing(1)};
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: ${e.spacing(1,3)};
    color: ${e.palette.background[800]};
    font-size: ${e.typography.body2.fontSize};
    line-height: ${e.typography.body2.lineHeight};
    white-space: nowrap;
    background-color: transparent;
    border: none;
    cursor: pointer;
    isolation: isolate;

    &.${o.sizeLarge} {
      gap: ${e.spacing(2)};
      padding: ${e.spacing(2,4)};
      font-size: ${e.typography.body1.fontSize};
      line-height: ${e.typography.body1.lineHeight};
    }

    &:hover,
    &.${o.selected}, &.${o.active} {
      color: ${e.palette.text.primary};
    }
  `);var _jsxruntime = require('react/jsx-runtime');var k=_react.forwardRef.call(void 0, ({size:e,tabIndex:t,...i},n)=>{let{children:l,className:a,selected:d}=i,{ariaAttributes:f,classes:p,getRootProps:g,handleKeyDown:u,handleOnClick:c}=_chunk5KRCPBZRcjs.k.call(void 0, i,n),y=m({...p,selected:d,size:e});return _jsxruntime.jsx.call(void 0, I,{...g(),...f,"aria-selected":d,className:_clsx2.default.call(void 0, a,y.root),onClick:c,onKeyDown:u,ref:n,tabIndex:t,children:l})});k.displayName="SegmentedItem";var C=k;var v=_chunk3CNSKST2cjs.m.call(void 0, "div")(({theme:e})=>_chunk5NXYDZPPcjs.p`
    display: inline-flex;
    max-width: 100%;
    padding: ${e.spacing(2)};
    background: ${e.palette.background[200]};
    border-radius: ${e.spacing(10)};
    outline: 1px solid ${e.palette.background[400]};
    outline-offset: -1px;

    &.${o.fullWidth} {
      width: 100%;
    }

    &.${o.sizeSmall} {
      padding: ${e.spacing(1)};
    }
  `),W=_chunk3CNSKST2cjs.m.call(void 0, "div",{shouldForwardProp:e=>!["isSelected","selectedPosition","size"].includes(String(e))})(({selectedPosition:e,theme:t})=>_chunk5NXYDZPPcjs.p`
    position: relative;
    display: flex;
    gap: ${t.spacing(1)};
    align-items: center;
    width: 100%;
    overflow: auto hidden;
    white-space: nowrap;
    scrollbar-width: none;

    &:before {
      position: absolute;
      top: 0;
      left: ${e.left}px;
      width: ${e.width}px;
      height: 100%;
      background: ${t.palette.background[600]};
      border: ${e.width>0&&`1px solid ${t.palette.tealOpaque[100]}`};
      border-radius: ${t.spacing(5.5)};
      opacity: 0;
      transition: ${t.transitions.create(["opacity","top","left"])};
      content: "";

      .${o.isSelected}& {
        opacity: 1;
      }
    }
  `);var b=_react.forwardRef.call(void 0, ({children:e,className:t,fullWidth:i,onChange:n,size:l,value:a,...d},f)=>{let p=_react.useRef.call(void 0, null),g=_chunk5KRCPBZRcjs.d.call(void 0, d),{children:u,selectedPosition:c}=_chunk5KRCPBZRcjs.o.call(void 0, {childDisplayName:"SegmentedItem",children:e,innerRef:p,onChange:n,size:l,value:a}),$=m({fullWidth:i,isSelected:typeof a<"u",selectedPosition:c,size:l});return _jsxruntime.jsx.call(void 0, v,{...g,className:_clsx2.default.call(void 0, t,$.root),ref:f,children:_jsxruntime.jsx.call(void 0, W,{className:_clsx2.default.call(void 0, $.inner),ref:p,selectedPosition:c,children:u})})});b.displayName="SegmentedControl";b.defaultProps={size:"small"};var A=Object.assign(b,{Item:C}),M= exports.b =A;exports.a = o; exports.b = M;
