import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{ct as n,ut as r}from"./Tooltip.CcubhKj6.js";import{t as i}from"./useLabel.DizWobrd.js";var a=(0,e(t(),1).createContext)(null);function o(e){let{description:t,errorMessage:a,isInvalid:o,validationState:s}=e,{labelProps:c,fieldProps:l}=i(e),u=r([!!t,!!a,o,s]),d=r([!!t,!!a,o,s]);return l=n(l,{"aria-describedby":[u,d,e[`aria-describedby`]].filter(Boolean).join(` `)||void 0}),{labelProps:c,fieldProps:l,descriptionProps:{id:u},errorMessageProps:{id:d}}}export{a as n,o as t};