import { jsxs, jsx } from "react/jsx-runtime";
import { tcv, tcx, MdRender } from "@choiceform/design-system";
import { FileDocument } from "@choiceform/icons-react";
import { memo } from "react";
import { t } from "../../../../i18n/index.js";
const MessageSummaryTv = tcv({
  slots: {
    root: "summary-message flex flex-col gap-2",
    content: "flex items-center gap-1 font-strong",
    icon: "text-icon-secondary flex size-5 items-center justify-center",
    description: ""
  }
});
const MessageSummary = memo(function MessageSummary2(props) {
  const { children, className } = props;
  const tv = MessageSummaryTv();
  const title = t("response", "summary-title");
  const content = typeof children === "string" ? children : children?.toString();
  return /* @__PURE__ */ jsxs("div", { className: tcx(tv.root(), className), children: [
    /* @__PURE__ */ jsxs("div", { className: tv.content(), children: [
      /* @__PURE__ */ jsx("div", { className: tv.icon(), children: /* @__PURE__ */ jsx(FileDocument, {}) }),
      /* @__PURE__ */ jsx("span", { children: title })
    ] }),
    /* @__PURE__ */ jsx("div", { className: tv.description(), children: content && /* @__PURE__ */ jsx(MdRender, { content }) })
  ] });
});
export {
  MessageSummary
};
//# sourceMappingURL=message-summary.js.map
