import { jsx as o, jsxs as i } from "react/jsx-runtime";
import { Avatar as c, AvatarImage as m, AvatarFallback as l } from "../atoms/avatar.js";
import { M as d } from "../../../markdown-Cv6uZPhi.js";
import { TooltipProvider as p, Tooltip as f, TooltipTrigger as g, TooltipContent as u } from "../atoms/tooltip.js";
import { cn as n } from "../../../lib/utils.js";
function N({ children: e, className: t, ...r }) {
  return /* @__PURE__ */ o("div", { className: n("flex items-start gap-3", t), ...r, children: e });
}
function T({ src: e, alt: t, fallback: r, className: s }) {
  return /* @__PURE__ */ i(c, { className: n("h-8 w-8 shrink-0", s), children: [
    /* @__PURE__ */ o(m, { alt: t, src: e }),
    r && /* @__PURE__ */ o(l, { children: r })
  ] });
}
function w({
  children: e,
  markdown: t = !1,
  className: r,
  ...s
}) {
  const a = n(
    "prose whitespace-normal break-words rounded-lg bg-secondary px-4 py-2 text-foreground",
    r
  );
  return t ? /* @__PURE__ */ o(d, { className: a, ...s, children: e }) : /* @__PURE__ */ o("div", { className: a, ...s, children: e });
}
function k({
  children: e,
  className: t,
  ...r
}) {
  return /* @__PURE__ */ o(
    "div",
    {
      className: n("flex items-center gap-2 text-muted-foreground", t),
      ...r,
      children: e
    }
  );
}
function b({
  tooltip: e,
  children: t,
  className: r,
  side: s = "top",
  ...a
}) {
  return /* @__PURE__ */ o(p, { children: /* @__PURE__ */ i(f, { ...a, children: [
    /* @__PURE__ */ o(g, { render: t }),
    /* @__PURE__ */ o(u, { className: r, side: s, children: e })
  ] }) });
}
export {
  N as Message,
  b as MessageAction,
  k as MessageActions,
  T as MessageAvatar,
  w as MessageContent
};
