import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"classnames";import o,{useMemo as i}from"react";import{camelCase as r}from"es-toolkit";import{getStyle as s}from"../../helpers/typesciptCssModulesHelper.js";import{getTestId as a,ComponentDefaultTestId as n}from"../../tests/testIds.js";import{Icon as m}from"@vibe/icon/mockedClassNames";import c from"../IconButton/IconButton.js";import{Info as l,Alert as p,CloseSmall as d}from"@vibe/icons";import{AttentionBoxType as u,IconTypeEnum as y}from"./AttentionBoxConstants.js";import{withStaticPropsWithoutForwardRef as f}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import v from"../Text/Text.js";import{Flex as N}from"@vibe/layout/mockedClassNames";import T from"./AttentionBox.module.scss.js";import{ComponentVibeId as j}from"../../tests/constants.js";var x=f((function(u){var y=u.className,f=u.withIconWithoutHeader,x=void 0!==f&&f,g=u.type,h=void 0===g?"primary":g,C=u.icon,E=u.iconType,I=void 0===E?"svg":E,B=u.title,b=u.text,A=u.children,w=u.withoutIcon,H=void 0!==w&&w,S=u.onClose,k=u.compact,O=void 0!==k&&k,_=u.id,z=u["data-testid"],P=u.closeButtonAriaLabel,F=void 0===P?"Close":P,L=u.entryAnimation,W=void 0!==L&&L,X=i((function(){return"primary"===h?l:p}),[h]),M=void 0===C?X:C;return o.createElement("aside",{className:t(T.attentionBox,s(T,r("type-".concat(h))),y,e({},T.entryAnimation,W)),role:"alert","data-testid":z||a(n.ATTENTION_BOX,_),"data-vibe":j.ATTENTION_BOX},B&&o.createElement(N,{justify:"start",align:"center",className:T.titleContainer,gap:"xs"},!H&&o.createElement(m,{className:T.icon,iconType:I,ariaHidden:!0,icon:M,ignoreFocusStyle:!0,iconSize:"20"}),o.createElement(v,{type:"text1",element:"h5",weight:"medium",className:T.title},B)),o.createElement(N,{justify:"start",align:"center",gap:"xs"},!B&&O&&!H&&x&&o.createElement(m,{iconType:I,iconSize:18,ariaHidden:!0,icon:M,ignoreFocusStyle:!0}),o.createElement(v,{type:"text2",element:O?void 0:"p",className:t(T.text,e(e(e({},T.compact,O),T.dismissible,!!S),T.paragraph,!O))},b||A)),S&&o.createElement(c,{size:"small",color:"on-primary-color",className:T.closeIcon,wrapperClassName:t(T.closeIconWrapper,e({},T.closeIconCompact,O)),ariaLabel:F,hideTooltip:!0,icon:d,onClick:S}))}),{types:u,iconTypes:y});export{x as default};
//# sourceMappingURL=AttentionBox.js.map
