"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../_virtual/jsx-runtime.js"),v=require("react"),E=require("../../icons/Close.js"),h=require("../../utils/index.js"),l=require("../Button/index.js"),q=require("../IconButton/index.js"),n=require("./styles.js"),k=require("./utils.js");function c({dismissAction:s,primaryAction:i,variant:o,compact:r,showClose:d,title:x,onClose:j,children:C,className:R,componentName:g="banner",...a},p){const m=i||s,u=k.getIcon(a.icon,o),e=h.getId(a["data-testid"]);return t.jsxRuntimeExports.jsxs(n.Wrapper,{variant:o,componentName:g,className:R,role:"alert","data-testid":a["data-testid"],"data-trackid":a["data-trackid"],ref:p,children:[u&&t.jsxRuntimeExports.jsx(n.IconWrapper,{"data-testid":e("icon"),children:u}),t.jsxRuntimeExports.jsxs(n.Container,{compact:r,"data-testid":e("container"),children:[x&&!r&&t.jsxRuntimeExports.jsx(n.Title,{"data-testid":e("title"),children:x}),t.jsxRuntimeExports.jsx(n.Content,{"data-testid":e("content"),children:C}),m&&t.jsxRuntimeExports.jsxs(n.Actions,{"data-testid":e("actions"),compact:r,showClose:d,children:[s&&t.jsxRuntimeExports.jsx(l.Button,{variant:"ghost",onClick:s.onClick,size:"xSmall","data-testid":e("secondary-action"),children:s.label}),i&&t.jsxRuntimeExports.jsx(l.Button,{variant:"primary",onClick:i.onClick,size:"xSmall","data-testid":e("primary-action"),children:i.label})]})]}),d&&t.jsxRuntimeExports.jsx(n.CloseIcon,{compact:r,"data-testid":e("close-icon-wrapper"),children:t.jsxRuntimeExports.jsx(q.IconButton,{icon:t.jsxRuntimeExports.jsx(E.default,{}),size:"medium",variant:"ghost-tertiary",onClick:j,"data-testid":e("close-icon-button")})})]})}const I=v.forwardRef(c);exports.MessagingContent=I;exports.MessagingContentComponent=c;
