import { jsxs as m, jsx as e } from "react/jsx-runtime";
import { a as f } from "./index.CfQlFjZU.js";
import { n as i } from "./index.B0wX8xO7.js";
import { a as C, D as M, M as y, E as _, F as g } from "./index.dWlEA7uO.js";
import { c as h } from "./index.CfM2L_w0.js";
import { B } from "./Button.CpTwUWVr.js";
const N = "creator_komi_message_VG3yH", p = "creator_closeButton_f-3Kt", z = "creator_bodyContainer_SqMCP", v = "creator_body_W6c6Z", k = "creator_semantic_default_HemzB", w = "creator_semantic_warning_j6MSr", x = "creator_semantic_info_eVFxB", j = "creator_semantic_success_uJHrd", H = "creator_semantic_error_-euGc", o = { komi_message: N, closeButton: p, bodyContainer: z, body: v, semantic_default: k, semantic_warning: w, semantic_info: x, semantic_success: j, semantic_error: H }, S = ({
  text: t,
  semantic: s,
  showIcon: a,
  dismissible: r,
  onDismiss: n,
  buttonProps: c
}) => ({
  semantic: s,
  containerClassName: h(
    o.komi_message,
    o[`semantic_${s}`]
  ),
  bodyContainer: o.bodyContainer,
  bodyClassName: o.body,
  closeButtonClassName: o.closeButton,
  text: t,
  showIcon: a,
  icon: {
    default: /* @__PURE__ */ e(_, { size: 24, role: "button" }),
    info: /* @__PURE__ */ e(_, { size: 24, role: "button" }),
    success: /* @__PURE__ */ e(y, { size: 24, "data-testid": "SuccessIcon", role: "button" }),
    warning: /* @__PURE__ */ e(M, { size: 24, role: "button" }),
    error: /* @__PURE__ */ e(C, { size: 24, role: "button" })
  }[s],
  showDismiss: r,
  onDismiss: n,
  buttonProps: c
}), V = ({
  containerClassName: t,
  bodyContainer: s,
  bodyClassName: a,
  closeButtonClassName: r,
  text: n,
  showIcon: c = !0,
  icon: d,
  showDismiss: u,
  onDismiss: b,
  buttonProps: l
}) => /* @__PURE__ */ m("div", { role: "alert", className: t, children: [
  /* @__PURE__ */ e(i, { value: c, then: d }),
  /* @__PURE__ */ m("div", { className: s, children: [
    /* @__PURE__ */ e("p", { className: a, "data-testid": "body", children: n }),
    /* @__PURE__ */ e(i, { value: l, then: /* @__PURE__ */ e(B, { ...l }) })
  ] }),
  /* @__PURE__ */ e(
    i,
    {
      value: u,
      then: /* @__PURE__ */ e(
        "div",
        {
          role: "button",
          "data-testid": "closeButton",
          onClick: b,
          className: r,
          children: /* @__PURE__ */ e(g, { size: 24, "aria-label": "Close" })
        }
      )
    }
  )
] }), q = f(V, S);
export {
  V as M,
  q as a,
  S as u
};
