import*as r from"react";import{useFormControlContext as e}from"./form-control.js";import{omitThemingProps as s}from"../../../system/dist/esm/system.utils.js";import{forwardRef as t}from"../../../system/dist/esm/forward-ref.js";import{useStyleConfig as i}from"../../../system/dist/esm/use-style-config.js";import{chakra as a}from"../../../system/dist/esm/system.js";import{cx as o}from"../../../utils/dist/esm/dom.js";import{__DEV__ as l}from"../../../utils/dist/esm/assertion.js";import{useStyles as m}from"../../../system/dist/esm/providers.js";function n(){return(n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t])}return r}).apply(this,arguments)}var d=t(((t,l)=>{var m,d=i("FormLabel",t),u=s(t),{children:f,requiredIndicator:p=r.createElement(c,null)}=u,y=function(r,e){if(null==r)return{};var s,t,i={},a=Object.keys(r);for(t=0;t<a.length;t++)s=a[t],e.indexOf(s)>=0||(i[s]=r[s]);return i}(u,["className","children","requiredIndicator"]),v=e(),j=null!=(m=null==v?void 0:v.getLabelProps(y,l))?m:n({ref:l},y);return r.createElement(a.label,n({},j,{className:o("chakra-form__label",u.className),__css:n({display:"block",textAlign:"start"},d)}),f,null!=v&&v.isRequired?p:null)}));l&&(d.displayName="FormLabel");var c=t(((s,t)=>{var i=e(),l=m();if(null==i||!i.isRequired)return null;var d=o("chakra-form__required-indicator",s.className);return r.createElement(a.span,n({},null==i?void 0:i.getRequiredIndicatorProps(s,t),{__css:l.requiredIndicator,className:d}))}));l&&(c.displayName="RequiredIndicator");export{d as FormLabel,c as RequiredIndicator};
//# sourceMappingURL=form-label.js.map
