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