"use client";
import { cn as e } from "../../lib/utils.js";
import { Collapsible as t, CollapsibleContent as n, CollapsibleTrigger as r } from "../ui/collapsible.js";
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
import { BookIcon as s, ChevronDownIcon as c } from "lucide-react";
//#region src/components/ai-elements/sources.tsx
var l = ({ className: n, ...r }) => /* @__PURE__ */ a(t, {
	className: e("not-prose text-primary mb-4 text-xs", n),
	...r
}), u = ({ className: t, count: n, children: s, ...l }) => /* @__PURE__ */ a(r, {
	className: e("flex items-center gap-2", t),
	...l,
	children: s ?? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("p", {
		className: "font-medium",
		children: [
			"Used ",
			n,
			" sources"
		]
	}), /* @__PURE__ */ a(c, { className: "h-4 w-4" })] })
}), d = ({ className: t, ...r }) => /* @__PURE__ */ a(n, {
	className: e("mt-3 flex w-fit flex-col gap-2", "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in outline-none", t),
	...r
}), f = ({ href: e, title: t, children: n, ...r }) => /* @__PURE__ */ a("a", {
	className: "flex items-center gap-2",
	href: e,
	rel: "noreferrer",
	target: "_blank",
	...r,
	children: n ?? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(s, { className: "h-4 w-4" }), /* @__PURE__ */ a("span", {
		className: "block font-medium",
		children: t
	})] })
});
//#endregion
export { f as Source, l as Sources, d as SourcesContent, u as SourcesTrigger };
