"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../_virtual/jsx-runtime.js"),r=require("./styles.js"),n=require("../../../utils/index.js"),d=require("../../Button/index.js"),j=require("./utils.js"),v=require("./ToastIcon.js");const l={text:"",onClick:n.noop};function g(e){const s=n.getId(e["data-testid"]),x=n.getId(e["data-trackid"]),{className:u,variant:i="neutral",message:m,action:p,primaryAction:o=l,icon:c}=e;let a=l;return e.action==="acknowledge"&&(a=e.dismissAction),t.jsxRuntimeExports.jsxs(r.ToastWrapper,{className:u,variant:i,"data-testid":s("wrapper"),"data-trackid":x("wrapper"),"aria-label":e["aria-label"],role:j.getAriaRole(i),children:[t.jsxRuntimeExports.jsxs(r.CompactWrapper,{children:[i==="neutral"&&c?c:t.jsxRuntimeExports.jsx(v.default,{variant:i}),t.jsxRuntimeExports.jsx(r.MessageWrapper,{children:m})]}),t.jsxRuntimeExports.jsxs(r.ActionWrapper,{children:[p==="acknowledge"&&a&&t.jsxRuntimeExports.jsx(d.Button,{size:"xSmall",variant:"inverse-ghost",onClick:a.onClick,"data-testid":s("dismiss-button"),children:a.text}),t.jsxRuntimeExports.jsx(d.Button,{size:"xSmall",variant:"inverse-ghost",onClick:o.onClick,"data-testid":s("action-button"),children:o.text})]})]})}exports.Toast=g;
