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