"use client";
import{b as m}from"./chunk-5X5UU2I7.js";import{e as u}from"./chunk-CLTGASR6.js";import{a as g,m as t}from"./chunk-3CHPBNY2.js";import{p as n,s as S}from"./chunk-KEPQUAOX.js";var O=g("EulSelect",["disabled","endAdornment","error","warning","fullWidth","infoText","inner","value","label","root","startAdornment","wrapper"]),h=e=>u("EulSelect",{endAdornment:["endAdornment"],infoText:["infoText",e.error&&"error",e.warning&&"warning"],inner:["inner"],label:["label",e.error&&"error",e.warning&&"warning"],root:["root",e.fullWidth&&"fullWidth"],startAdornment:["startAdornment"],value:["value"],wrapper:["wrapper",e.disabled&&"disabled",e.error&&"error",e.warning&&"warning"]}),r=O;import{forwardRef as L,Fragment as j}from"react";import{faCaretDown as q}from"@fortawesome/free-solid-svg-icons/faCaretDown";import{FontAwesomeIcon as D}from"@fortawesome/react-fontawesome";import*as i from"@radix-ui/react-select";import p from"clsx";var B=g("EulInput",["disabled","endAdornment","error","warning","rtl","noLabel","focused","fullWidth","hasValue","infoText","inner","input","label","labelShrink","root","startAdornment","wrapper","loading"]),_=e=>{let o=e.value!==void 0&&e.value!==null&&e.value!=="";return u("EulInput",{endAdornment:["endAdornment"],infoText:["infoText",e.error&&"error",e.warning&&"warning"],inner:["inner"],input:["input",e.noLabel&&"noLabel",e.rtl&&"rtl"],label:["label",(o||e.focused||e.placeholder||e.loading||e.shrinkLabel)&&"labelShrink",e.error&&"error",e.warning&&"warning"],root:["root",e.fullWidth&&"fullWidth"],startAdornment:["startAdornment"],wrapper:["wrapper",o&&"hasValue",e.disabled&&"disabled",e.focused&&"focused",e.error&&"error",e.warning&&"warning",e.loading&&"loading"]})},a=B;var I=t("div")(({theme:e})=>n`
    display: flex;
    flex-direction: column;
    gap: ${e.spacing(2)};
    width: ${e.spacing(90)};
    max-width: 100%;

    &.${a.fullWidth}, &.${r.fullWidth} {
      width: 100%;
    }
  `),le=t("div")(({theme:e})=>n`
    position: relative;
    display: inline-flex;
    flex-direction: row;
    gap: ${e.spacing(4)};
    align-items: center;
    width: 100%;
    padding: ${e.spacing(2.5,4)};
    color: ${e.palette.teal[600]};
    background-color: ${e.palette.background[200]};
    border: none;
    border-radius: ${e.spacing(2)};
    outline: 2px solid transparent;
    outline-offset: -2px;
    cursor: text;
    transition: ${e.transitions.create(["background-color","outline-color"])};

    &:hover {
      background-color: ${e.palette.background[100]};
    }

    &.${a.loading} {
      cursor: default;
    }

    &.${a.error}, &.${r.error} {
      color: ${e.palette.red[600]};
      outline-color: currentColor;
    }

    &.${a.warning}, &.${r.warning} {
      color: ${e.palette.yellowOpaque[600]};
      background-color: ${e.palette.yellowOpaque[100]};
      outline-color: currentColor;
    }

    &.${a.focused}, &[aria-expanded="true"],
    &:focus-visible {
      outline-color: currentColor;
    }

    &.${a.disabled}, &.${r.disabled} {
      background-color: transparent;
      outline-width: 1px;
      outline-color: ${e.palette.background[600]};
      cursor: not-allowed;
    }

    &.${a.disabled} *,
    &.${r.disabled} * {
      cursor: not-allowed;
    }
  `),ie=t("div")`
  position: relative;
  width: 100%;
`,k=t("label")(({theme:e})=>n`
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    color: ${e.palette.background[700]};
    font-weight: ${e.typography.body1.fontWeight};
    font-size: ${e.typography.body1.fontSize};
    line-height: ${e.typography.body1.lineHeight};
    transform: translateY(-50%);
    transition: ${e.transitions.create(["color","font-size","font-weight","line-height","top"])};

    user-select: none;
    pointer-events: none;

    &.${a.labelShrink}, span:not(:empty) + & {
      top: ${e.spacing(2)};
      color: ${e.palette.text.subText};
      font-weight: ${e.typography.fontWeightMedium};
      font-size: ${e.typography.body2.fontSize};
      line-height: ${e.typography.body2.lineHeight};
    }
  `),se=t("input")(({theme:e,variant:o="body1"})=>n`
    width: 100%;
    padding: ${e.spacing(4,0,0)};
    color: ${e.palette.text.primary};
    font-weight: ${e.typography[o].fontWeight};
    font-size: ${e.typography[o].fontSize};
    line-height: ${e.typography[o].lineHeight};
    background-color: transparent;
    border: none;
    outline: none;

    &.${a.noLabel} {
      padding: ${e.spacing(2,0)};
    }

    &.${a.rtl} {
      text-align: right;
    }

    &[type="number"] {
      -moz-appearance: textfield;
    }

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      margin: 0;
      -webkit-appearance: none;
    }
  `),C=t("div")(({theme:e})=>n`
    display: flex;
    gap: ${e.spacing(2.5)};
    align-items: center;
    padding: ${e.spacing(0,1.5)};
    color: ${e.palette.text.subText};
    font-weight: ${e.typography.body1.fontWeight};
    font-size: ${e.typography.body1.fontSize};
    line-height: ${e.typography.body1.lineHeight};
    user-select: none;

    &.${a.error}, &.${r.error} {
      color: ${e.palette.red[800]};
    }

    &.${a.warning}, &.${r.warning} {
      color: ${e.palette.yellow[800]};
    }
  `),de=t(m,{shouldForwardProp:e=>!["fontVariant","widthOverride"].includes(e.toString())})(({fontVariant:e="body1",theme:o,widthOverride:s="100%"})=>n`
      width: ${typeof s=="number"?`${s}px`:s};
      height: calc(${o.typography[e].fontSize});
      margin-top: calc(
        ${o.spacing(4)} +
          (
            ${o.typography[e].fontSize} * ${o.typography[e].lineHeight} -
              ${o.typography[e].fontSize}
          )
      );
    `);import*as c from"@radix-ui/react-select";var v=t(c.Group)(({theme:e})=>n`
    & [role="option"] {
      display: flex;
      gap: ${e.spacing(3)};
      align-items: center;
      padding: ${e.spacing(3,4)};
      color: ${e.palette.text.primary};
      font-size: ${e.typography.body1.fontSize};
      line-height: ${e.typography.body1.lineHeight};
      border: none;
      border-radius: ${e.spacing(1)};
      outline: none;
      cursor: pointer;
      user-select: none;

      &[data-highlighted] {
        background-color: ${e.palette.background[500]};
      }
    }
  `),R=t("button")(({theme:e})=>n`
    position: relative;
    display: inline-flex;
    flex-direction: row;
    gap: ${e.spacing(4)};
    align-items: center;
    width: 100%;
    padding: ${e.spacing(2.5,4)};
    color: ${e.palette.teal[600]};
    background-color: ${e.palette.background[200]};
    border: none;
    border-radius: ${e.spacing(2)};
    outline: 2px solid transparent;
    outline-offset: -2px;
    cursor: pointer;
    transition: ${e.transitions.create(["background-color","outline-color"])};

    &:hover {
      background-color: ${e.palette.background[100]};
    }

    &.${r.error} {
      color: ${e.palette.red[600]};
      outline-color: currentColor;
    }

    &[aria-expanded="true"],
    &:focus-visible {
      outline-color: currentColor;
    }

    &.${r.disabled} {
      background-color: transparent;
      outline-width: 1px;
      outline-color: ${e.palette.background[600]};
      cursor: not-allowed;
    }

    &.${r.disabled} * {
      cursor: not-allowed;
    }
  `),z=t(c.Content)(({theme:e})=>n`
    z-index: ${e.zIndex.tooltip+1};
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: var(--radix-select-trigger-width);
    max-height: ${e.spacing(56)};
    padding: ${e.spacing(3)};
    background: ${e.palette.background[300]};
    border: 1px solid ${e.palette.background[500]};
    border-radius: ${e.spacing(2)};
    box-shadow: 0 ${e.spacing(3)} ${e.spacing(4)} ${e.spacing(-1)}
        rgba(27, 27, 27, 0.08),
      0 ${e.spacing(1)} ${e.spacing(1.5)} ${e.spacing(-.5)} rgba(27, 27, 27, 0.03);
    isolation: isolate;
  `),T=t(c.Viewport)({width:"100%"}),W=t("div")(({theme:e})=>n`
    position: relative;
    width: 100%;

    & > span {
      display: block;
      width: 100%;
      min-height: ${e.spacing(9)};
      padding: ${e.spacing(4,0,0)};
      color: ${e.palette.text.primary};
      font-weight: ${e.typography.body1.fontWeight};
      font-size: ${e.typography.body1.fontSize};
      line-height: ${e.typography.body1.lineHeight};
      text-align: left;
      background-color: transparent;
      border: none;
      outline: none;
    }
  `),A=t("div")(({theme:e})=>n`
    display: flex;
    align-items: center;
    justify-content: center;
    width: ${e.spacing(6)};
    height: ${e.spacing(6)};
    color: ${e.palette.text.subText};

    [aria-expanded="true"] & {
      transform: rotate(180deg);
    }
  `);import{jsx as l,jsxs as $}from"react/jsx-runtime";var N=L(({children:e,className:o,...s},f)=>l(i.Item,{className:o,...s,ref:f,children:l(i.ItemText,{children:e})}));N.displayName="Select.Item";var V=L(({buttonProps:e,children:o,disablePortal:s,error:f,fullWidth:H,infoText:x,label:y,selectedLabel:P,startAdornment:w,warning:E,...b},U)=>{let d=h({disabled:b.disabled,error:f,fullWidth:H,warning:E}),G=s?j:i.Portal;return l(I,{className:p(d.root),children:$(i.Root,{...b,children:[$(R,{...e,"aria-label":y,as:i.Trigger,className:p(d.wrapper,b.className),ref:U,children:[w&&l(S,{alignItems:"center",className:p(d.startAdornment),display:"flex",justifyContent:"center",children:w}),$(W,{className:p(d.inner),children:[l(i.Value,{className:p(d.value),children:P}),l(k,{className:p(d.label),children:y})]}),l(A,{children:l(D,{icon:q})})]}),x&&l(C,{className:p(d.infoText),children:x}),l(G,{children:l(z,{position:"popper",sideOffset:8,children:l(T,{children:l(v,{children:o})})})})]})})});V.displayName="Select";var Y=Object.assign(V,{Item:N});export{_ as a,a as b,r as c,Y as d,I as e,le as f,ie as g,k as h,se as i,C as j,de as k};
