import{r as l,t as u,a as m,j as c,i as d}from"./main-tangy-colts-beg.js";import{T as g}from"./index-tangy-colts-beg-131.js";import{I as f}from"./index-tangy-colts-beg-216.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const{Text:s}=g;function y({helperText:t,invalidMessage:e,label:o,onRender:a,status:h,wrapperClassName:n,...r}){const i=l.useId(),{token:p}=u.useToken();return l.useEffect(()=>{a==null||a()},[]),m("div",{className:n,children:[o&&m("label",{className:"d-b mb-1 font-medium",css:d({color:p.colorText},"",""),htmlFor:i,children:[o,r.required&&c(s,{className:"leading-none",type:"danger",children:"*"})]}),c(f,{"data-testid":"inputComponent",id:i,status:h,...r}),h==="error"&&e&&c(s,{type:"danger",children:e}),!e&&t&&c(s,{type:"secondary",children:t})]})}globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};export{y as I};
