"use client";
import{d as h}from"./chunk-SUBVXXYD.js";import{b as $}from"./chunk-QNBAPDGH.js";import{b as S}from"./chunk-3NQOMOHD.js";import{e as x}from"./chunk-CLTGASR6.js";import{a as g,m as t}from"./chunk-3CHPBNY2.js";import{p as i,s as f}from"./chunk-KEPQUAOX.js";import{forwardRef as F,useState as X}from"react";import p from"clsx";var A=g("EulSlider",["root","marked","vertical","disabled","dragging","rail","track","trackFalse","trackInverted","thumb","active","focusVisible","mark","marksWrapper","markActive","markLabel","markLabelActive","green","markChip","red","teal","wrapper","yellow"]),y=e=>x("EulSlider",{markChip:["markChip"],markLabel:["markLabel"],marksWrapper:["marksWrapper"],root:[e.color],wrapper:["wrapper"]}),r=A;var C=t("div")`
  position: relative;
  width: 100%;
`,v=t("div")`
  position: absolute;
  top: -20px;
  display: flex;
  width: 100%;
`,w=t("div",{shouldForwardProp:e=>e!=="left"})(({left:e})=>i`
    position: absolute;
    left: ${e}%;
    transform: translateX(-50%);
  `),L=t(f)(({theme:e})=>i`
    & .${r.markLabel} {
      color: ${e.palette.background[700]};
      font-size: 10px;
      cursor: pointer;

      &:nth-of-type(2n + 1) {
        color: ${e.palette.background[800]};
        font-size: 12px;
      }
    }
  `),M=t(h,{shouldForwardProp:e=>!["color","backgroundThumb"].includes(e.toString())})(({backgroundThumb:e,theme:a})=>i`
    position: relative;
    display: inline-block;
    width: 100%;
    height: 6px;
    padding: 16px 0;
    color: ${a.palette.teal[700]};
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;

    &:hover {
      opacity: 1;
    }

    &.${r.disabled} {
      cursor: default;
      pointer-events: none;

      & .${r.track} {
        background-color: #4d5d69;
      }

      & .${r.thumb} {
        border: 5px solid #4d5d69;
      }
    }

    & .${r.rail} {
      position: absolute;
      display: block;
      width: 100%;
      height: 6px;
      background-color: ${a.palette.tealOpaque[700]};
      border-radius: 4px;
      opacity: 0.4;
    }

    & .${r.track} {
      position: absolute;
      display: block;
      height: 6px;
      background-color: currentColor;
      border-radius: 4px;
    }

    & .${r.thumb} {
      position: absolute;
      box-sizing: border-box;
      width: 16px;
      height: 16px;
      margin-top: -5px;
      margin-left: -5px;
      background-color: ${e||a.palette.background[300]};
      border: 5px solid currentColor;
      border-radius: 50%;
      outline: 3px solid ${e||a.palette.background[300]};
    }

    &.${r.green} {
      .${r.track} {
        background-color: ${a.palette.green[800]};
      }
      .${r.thumb} {
        border-color: ${a.palette.green[800]};
      }
    }

    &.${r.red} {
      .${r.track} {
        background-color: ${a.palette.red[800]};
      }

      .${r.thumb} {
        border-color: ${a.palette.red[800]};
      }
    }

    &.${r.teal} {
      .${r.track} {
        background-color: ${a.palette.teal[700]};
      }

      .${r.thumb} {
        border-color: ${a.palette.teal[700]};
      }
    }

    &.${r.yellow} {
      .${r.track} {
        background-color: ${a.palette.yellow[800]};
      }

      .${r.thumb} {
        border-color: ${a.palette.yellow[800]};
      }
    }

    & .${r.focusVisible} {
      box-shadow: 0 0 0 8px rgba(172, 179, 184, 0.16);
    }

    & .${r.mark} {
      position: absolute;
      top: 50%;
      width: 6px;
      height: 6px;
      background-color: currentColor;
      border-radius: 2px;
      transform: translateX(-50%);
      opacity: 0;
    }

    & .${r.markActive} {
      background-color: #fff;
    }

    & .${r.markLabel} {
      position: absolute;
      top: 27px;
      margin-top: 8px;
      color: ${a.palette.background[700]};
      font-size: 10px;
      transform: translateX(-50%);

      &:nth-of-type(4n) {
        top: 25px;
        color: ${a.palette.background[800]};
        font-size: 12px;
      }
    }
  `);import{jsx as l,jsxs as q}from"react/jsx-runtime";var c=F((e,a)=>{let{backgroundThumb:W,className:P,defaultValue:u=0,marks:b,max:d=100,min:N=0,setValue:m,value:k,weight:V,...z}=e,[I,n]=k!=null&&m?[k,m]:X(u),s=y(e);return q(C,{className:p(P,s.wrapper),children:[l(v,{className:p(s.marksWrapper),children:b?.filter(o=>o?.chipLabel).map(o=>l(w,{left:o.value/d*d,children:l($,{className:p(s.markChip),color:"grey",onClick:()=>n(o.value),uppercase:!0,variant:"outlined",weight:V,children:o.chipLabel},o.value)},o.value))}),l(M,{...z,backgroundThumb:W,classes:{...r,root:p(s.root,r.root)},defaultValue:u,max:d,min:N,onChange:(o,T)=>n(T),ref:a,value:I}),l(L,{className:"test",sx:{alignItems:"baseline",display:"flex",justifyContent:"space-between"},children:b?.map(o=>l(S,{className:p(s.markLabel),onClick:()=>n(o.value),children:o.label},o.value))})]})});c.displayName="Slider";c.defaultProps={color:"teal"};var U=c;export{r as a,U as b};
