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