define(['exports', 'preact/jsx-runtime', './FormFieldContext-3c44aaaa', './useFormFieldContext-8196183c', './classNames-08d99695', './FormContext-5130e198', './useFormContext-30acdd33', './useComponentTheme-5aa41a8f', './TabbableModeContext-a9c97640', 'preact/hooks', './LayerHost-733ade2f', 'preact/compat', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './Flex-590160eb', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-30886397', 'css!./IconStyle.styles.css', './IconButton-368fba34', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-2e19d8de', './logger-0f873e29', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './InputGroupContext-372087af', './Popup-3e2566da', './UNSAFE_Separator/themes/SeparatorStyles.css', './CompactLabelAssistance-9f9f658d', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './UNSAFE_TextField/themes/redwood/TextFieldTheme', './UNSAFE_Label/themes/redwood/LabelTheme'], (function(e,s,o,t,a,n,l,d,i,r,c,m,p,u,F,h,y,b,S,T,x,C,A,U,g,w,E,N,L,f,I,M,V,_,B,R,D,j,k,P,v,O,W){"use strict";const q=({hasValue:e,readonly:o,disabled:t,isFocused:n,isRequiredShown:i,helpIconId:r,helpSourceLink:c,helpSourceText:m,userAssistanceDensity:p="reflow",variant:u="inside",parentComponentVariant:F="textField",...h})=>{const{isFormLayout:y,isReadonly:b,labelWrapping:S}=l.useFormContext(),T="inside"===u,x="textField"===F,{classes:C,styles:{uaDensityCompactLabel:A,uaDensityCompactLabelStart:U,uaDensityCompactLabelTopInside:g}}=d.useComponentTheme(W.LabelRedwoodTheme,{labelWrapping:S,position:u,inside:T?"isInside":"notInside",inEnabledForm:y&&!b?"isInEnabledForm":"notInEnabledForm",readonly:o?"isReadonly":"notReadonly",focused:n?"isFocused":"nonFocused",formLayout:y?"isFormLayout":"nonFormLayout",readonlyForm:b?"isReadonlyForm":"notReadonlyForm",textField:x?"isTextField":"notTextField",value:e?"hasValue":"noValue",valueOrFocus:e||n?"hasValueOrFocus":"noValueOrFocus",animatedWhenInside:x?"isAnimated":"notAnimated",disabled:x&&t?"isDisabled":"nonDisabled",userAssistanceDensity:p}),{baseTheme:w}=d.useComponentTheme(O.TextFieldRedwoodTheme),E=a.classNames([A,"start"===u?U:g]),N=s.jsx("label",{...h,class:E});return"compact"===p?s.jsxs("div",{class:a.classNames([C,w]),children:["start"!==u&&N,s.jsx(k.CompactLabelAssistance,{isRequiredShown:i,helpIconId:r,helpSourceLink:c,helpSourceText:m,labelEdge:"top"===u||"start"===u?u:"inside"}),"start"===u&&N]}):s.jsx("label",{...h,class:a.classNames([C,w])})};e.Label=({forId:e,...o})=>{const{hasValue:a,isDisabled:n,isFocused:l,isReadonly:d}=t.useFormFieldContext();return s.jsx(q,{for:e,hasValue:a,disabled:n,isFocused:l,readonly:d,...o})}}));
//# sourceMappingURL=Label-41b672b4.js.map
