"use strict";const e=require("react/jsx-runtime"),i=require("@commercetools/nimbus-icons"),A=require("@chakra-ui/react"),g=require("./icon-button-CVdz2C9L.cjs.js"),r=require("./normalize-messages-DtVffO09.cjs.js"),{withProvider:x,withContext:n}=A.createSlotRecipeContext({key:"nimbusAlert"}),p=x("div","root"),j=n("div","title"),h=n("div","description"),M=n("div","icon"),D=n("div","actions"),f=n("div","dismissButton"),v=s=>{switch(s){case"critical":return e.jsx(i.ErrorOutline,{});case"info":return e.jsx(i.Info,{});case"warning":return e.jsx(i.WarningAmber,{});case"positive":return e.jsx(i.CheckCircleOutline,{});default:return null}},l=s=>{const{ref:t,children:d,...o}=s;return e.jsxs(p,{ref:t,...o,role:"alert",children:[e.jsx(M,{alignItems:"flex-start",children:v(o.colorPalette)}),d]})};l.displayName="Alert.Root";const c=({children:s,...t})=>e.jsx(j,{...t,fontWeight:"600",children:s});c.displayName="Alert.Title";const a=({children:s,...t})=>e.jsx(h,{...t,children:s});a.displayName="Alert.Description";const m=({children:s,...t})=>e.jsx(D,{...t,children:s});m.displayName="Alert.Actions";const z={dismiss:"Dismiss"},B={dismiss:"Verwerfen"},R={dismiss:"Desechar"},y={dismiss:"Fermer"},C={dismiss:"Dispensar"},I={en:r.normalizeMessages(z),de:r.normalizeMessages(B),es:r.normalizeMessages(R),"fr-FR":r.normalizeMessages(y),"pt-BR":r.normalizeMessages(C)},u=({...s})=>{const t=r.useLocalizedStringFormatter(I);return e.jsx(f,{children:e.jsx(g.IconButton,{"aria-label":t.format("dismiss"),...s,variant:"ghost",size:"2xs",children:e.jsx(i.Clear,{role:"img"})})})};u.displayName="Alert.DismissButton";exports.AlertActions=m;exports.AlertDescription=a;exports.AlertDismissButton=u;exports.AlertRoot=l;exports.AlertTitle=c;
//# sourceMappingURL=alert.dismiss-button-B3btoWr3.cjs.js.map
