"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require$$0 = require("react/jsx-runtime");
const iconsReact = require("@choiceform/icons-react");
const React = require("react");
const designSystem = require("@choiceform/design-system");
const index = require("../../../../i18n/index.cjs");
const markdown = require("../../../common/markdown/markdown.cjs");
const MessageWarningTv = designSystem.tcv({
  slots: {
    root: "warning-message border-warning-foreground/50 flex flex-col gap-2 rounded-lg border border-dashed p-2",
    content: "text-warning-foreground flex items-center gap-2 font-strong"
  }
});
const MessageWarning = React.memo(function MessageWarning2(props) {
  const { children, className } = props;
  const tv = MessageWarningTv();
  const title = index.t("response", "warning-title");
  const content = typeof children === "string" ? children : children?.toString();
  return /* @__PURE__ */ require$$0.jsxs("div", { className: designSystem.tcx(tv.root(), className), children: [
    /* @__PURE__ */ require$$0.jsxs("div", { className: tv.content(), children: [
      /* @__PURE__ */ require$$0.jsx(iconsReact.WarningSquare, {}),
      /* @__PURE__ */ require$$0.jsx("span", { className: "text-message", children: title })
    ] }),
    content && /* @__PURE__ */ require$$0.jsx(markdown.Markdown, { children: content })
  ] });
});
exports.MessageWarning = MessageWarning;
//# sourceMappingURL=message-warning.cjs.map
