import { jsxs as a, jsx as s } from "react/jsx-runtime";
import { CheckCircleOutline as l, WarningAmber as c, Info as m, ErrorOutline as d, Clear as u } from "@commercetools/nimbus-icons";
import { createSlotRecipeContext as A } from "@chakra-ui/react";
import { I as p } from "./icon-button-DQaOMIAe.es.js";
import { n as r, u as g } from "./normalize-messages-BN9BAFXe.es.js";
const { withProvider: f, withContext: i } = /* @__PURE__ */ A({
  key: "nimbusAlert"
}), h = /* @__PURE__ */ f(
  "div",
  "root"
), v = /* @__PURE__ */ i(
  "div",
  "title"
), D = /* @__PURE__ */ i("div", "description"), x = /* @__PURE__ */ i(
  "div",
  "icon"
), M = /* @__PURE__ */ i(
  "div",
  "actions"
), y = /* @__PURE__ */ i("div", "dismissButton"), B = (t) => {
  switch (t) {
    case "critical":
      return /* @__PURE__ */ s(d, {});
    case "info":
      return /* @__PURE__ */ s(m, {});
    case "warning":
      return /* @__PURE__ */ s(c, {});
    case "positive":
      return /* @__PURE__ */ s(l, {});
    default:
      return null;
  }
}, C = (t) => {
  const { ref: e, children: n, ...o } = t;
  return /* @__PURE__ */ a(h, { ref: e, ...o, role: "alert", children: [
    /* @__PURE__ */ s(x, { alignItems: "flex-start", children: B(o.colorPalette) }),
    n
  ] });
};
C.displayName = "Alert.Root";
const I = ({ children: t, ...e }) => /* @__PURE__ */ s(v, { ...e, fontWeight: "600", children: t });
I.displayName = "Alert.Title";
const R = ({
  children: t,
  ...e
}) => /* @__PURE__ */ s(D, { ...e, children: t });
R.displayName = "Alert.Description";
const w = ({ children: t, ...e }) => /* @__PURE__ */ s(M, { ...e, children: t });
w.displayName = "Alert.Actions";
const N = { dismiss: "Dismiss" }, _ = { dismiss: "Verwerfen" }, $ = { dismiss: "Desechar" }, b = { dismiss: "Fermer" }, F = { dismiss: "Dispensar" }, P = {
  en: /* @__PURE__ */ r(N),
  de: /* @__PURE__ */ r(_),
  es: /* @__PURE__ */ r($),
  "fr-FR": /* @__PURE__ */ r(b),
  "pt-BR": /* @__PURE__ */ r(F)
}, z = ({ ...t }) => {
  const e = g(P);
  return /* @__PURE__ */ s(y, { children: /* @__PURE__ */ s(
    p,
    {
      "aria-label": e.format("dismiss"),
      ...t,
      variant: "ghost",
      size: "2xs",
      children: /* @__PURE__ */ s(u, { role: "img" })
    }
  ) });
};
z.displayName = "Alert.DismissButton";
export {
  w as A,
  R as a,
  z as b,
  C as c,
  I as d
};
//# sourceMappingURL=alert.dismiss-button-BYbTqEqD.es.js.map
