define(['exports', 'preact/jsx-runtime', './useComponentTheme-5aa41a8f', 'preact/hooks', './Flex-590160eb', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', './LayerHost-733ade2f', 'preact/compat', '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', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceTheme', './ComponentMessageContainer-cf186eeb', './FormFieldContext-3c44aaaa', './useFormFieldContext-8196183c', './Popup-3e2566da', './Separator-181f7541', './CompactHelpSource-de995a7f', './UNSAFE_UserAssistance/themes/UserAssistanceStyles.css'], (function(e,s,t,o,n,a,i,r,l,c,p,d,m,h,u,g,y,C,S,F,x,A,U,f,M,T,b,B,w,E,N,_,j,v){"use strict";e.CompactUserAssistance=function({anchorRef:e,assistiveText:o,fieldLabel:n,id:a,messages:i=[]}){const{isInputFocused:r,isReadonly:l}=E.useFormFieldContext(),{isFocused:c,popupProps:p}=j.usePopupFocusWithin(),d=!0===r||!0===c,{baseTheme:m}=t.useComponentTheme(b.UserAssistanceRedwoodTheme);return!0!==l&&(i.length>0||o)?s.jsx(N.Popup,{...p,placement:"end-top-corner",isOpen:d,anchorRef:e,flipOptions:{mainAxis:!0,crossAxis:!1},tail:"simple",maxWidth:"296px",children:s.jsxs("div",{id:a,class:m,children:[i.length>0&&s.jsx(B.ComponentMessageContainer,{fieldLabel:n,messages:i}),i.length>0&&o&&s.jsx("span",{class:v.dividerStyle,children:s.jsx(_.Separator,{})}),o&&s.jsx("span",{class:v.assistiveStyles,children:o})]})}):null}}));
//# sourceMappingURL=CompactUserAssistance-3799998f.js.map
