import{r,t as d,a as l,j as s,l as m,i as g}from"./main-tangy-colts-beg.js";import{S as T}from"./index-tangy-colts-beg-900.js";import{T as j}from"./index-tangy-colts-beg-131.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,c){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,c),c)}};const{Text:n}=j;function y({direction:t="horizontal",helperText:c,invalidMessage:e,label:o,onRender:a,wrapperClassName:f,...p}){const h=r.useId(),{token:u}=d.useToken();r.useEffect(()=>{a==null||a()},[]);const i=t==="vertical";return l("div",{className:f,children:[l("div",{className:m(["flex",i?"flex-col-reverse items-start":"items-center"]),children:[s(T,{className:"","data-testid":"switchComponent",id:h,...p}),o&&s("label",{className:m(["font-medium",i?"mb-1":"ml-2"]),css:g({color:u.colorText},"",""),htmlFor:h,children:o})]}),e&&s(n,{type:"danger",children:e}),!e&&c&&s(n,{type:"secondary",children:c})]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,c){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,c),c)}};export{y as S};
