import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{dt as n}from"./Tooltip.CcubhKj6.js";var r=e(t(),1);function i(e,t){let{id:r,"aria-label":i,"aria-labelledby":a}=e;return r=n(r),a&&i?a=[...new Set([r,...a.trim().split(/\s+/)])].join(` `):a&&=a.trim().split(/\s+/).join(` `),!i&&!a&&t&&(i=t),{id:r,"aria-label":i,"aria-labelledby":a}}var a=(0,r.createContext)({});function o(e){let{id:t,label:r,"aria-labelledby":a,"aria-label":o,labelElementType:s=`label`}=e;t=n(t);let c=n(),l={};r&&(a=a?`${c} ${a}`:c,l={id:c,htmlFor:s===`label`?t:void 0});let u=i({id:t,"aria-label":o,"aria-labelledby":a});return{labelProps:l,fieldProps:u}}export{a as n,i as r,o as t};