"use client";
import { cn as e } from "../../lib/utils.js";
import { Button as t } from "../ui/button.js";
import { Tooltip as n, TooltipContent as r, TooltipProvider as i, TooltipTrigger as a } from "../ui/tooltip.js";
import { Qs as o } from "../../node_modules/streamdown/dist/chunk-BO2N2NFS.js";
import "../../node_modules/streamdown/dist/index.js";
import "../ui/button-group.js";
import { createContext as s, memo as c } from "react";
import { jsx as l, jsxs as u } from "react/jsx-runtime";
import "lucide-react";
//#region src/components/ai-elements/message.tsx
var d = ({ className: t, from: n, ...r }) => /* @__PURE__ */ l("div", {
	className: e("group relative flex w-full flex-col gap-2 rounded-lg transition-colors", n === "user" ? "is-user ml-auto max-w-[80%] justify-end" : "is-assistant", t),
	...r
}), f = ({ children: t, className: n, ...r }) => /* @__PURE__ */ l("div", {
	className: e("is-user:dark flex w-fit flex-col gap-2 overflow-hidden", "group-[.is-user]:bg-secondary group-[.is-user]:text-foreground group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:px-4 group-[.is-user]:py-3", "group-[.is-assistant]:text-foreground", n),
	...r,
	children: t
}), p = ({ className: t, children: n, ...r }) => /* @__PURE__ */ l("div", {
	className: e("absolute top-0 right-0 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100", t),
	...r,
	children: n
}), m = ({ tooltip: e, children: o, label: s, variant: c = "ghost", size: d = "icon-sm", ...f }) => {
	let p = /* @__PURE__ */ u(t, {
		size: d,
		type: "button",
		variant: c,
		...f,
		children: [o, /* @__PURE__ */ l("span", {
			className: "sr-only",
			children: s || e
		})]
	});
	return e ? /* @__PURE__ */ l(i, { children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ l(a, {
		asChild: !0,
		children: p
	}), /* @__PURE__ */ l(r, { children: /* @__PURE__ */ l("p", { children: e }) })] }) }) : p;
};
s(null);
var h = c(({ className: t, ...n }) => /* @__PURE__ */ l(o, {
	className: e("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", t),
	...n
}), (e, t) => e.children === t.children);
h.displayName = "MessageResponse";
//#endregion
export { d as Message, m as MessageAction, p as MessageActions, f as MessageContent, h as MessageResponse };
