import { cn as e } from "../../../lib/utils.js";
import { t } from "../../../dist-Ber_p4PA.js";
import { Card as n, CardContent as r, CardHeader as i } from "../atoms/card.js";
import { JsonHighlight as a } from "../atoms/json-highlight.js";
import { jsx as o, jsxs as s } from "react/jsx-runtime";
//#region lib/components/ui/molecules/tool-authorization.tsx
var c = t("my-2 gap-0 py-0", {
	variants: { status: {
		loading: "",
		pending: "",
		completed: "border-green-100 dark:border-green-950",
		failed: "border-red-100 dark:border-red-950"
	} },
	defaultVariants: { status: "loading" }
}), l = t("shrink-0 rounded-full p-2", {
	variants: { status: {
		loading: "bg-muted",
		pending: "bg-orange-50 dark:bg-orange-950/50",
		completed: "bg-green-50 dark:bg-green-950/50",
		failed: "bg-red-50 dark:bg-red-950/50"
	} },
	defaultVariants: { status: "loading" }
}), u = t("size-5", {
	variants: { status: {
		loading: "text-muted-foreground",
		pending: "text-orange-500 dark:text-orange-400",
		completed: "text-green-500 dark:text-green-400",
		failed: "text-red-500 dark:text-red-400"
	} },
	defaultVariants: { status: "loading" }
}), d = t("flex items-center gap-2 rounded-md p-3 text-xs", {
	variants: { status: {
		loading: "bg-muted text-muted-foreground",
		pending: "bg-orange-50 text-orange-700 dark:bg-orange-950/50 dark:text-orange-300",
		completed: "bg-green-50 text-green-700 dark:bg-green-950/50 dark:text-green-300",
		failed: "bg-red-50 text-red-700 dark:bg-red-950/50 dark:text-red-300"
	} },
	defaultVariants: { status: "loading" }
});
function f({ className: t, status: r, ...i }) {
	return /* @__PURE__ */ o(n, {
		className: e(c({ status: r }), t),
		"data-slot": "tool-authorization",
		...i
	});
}
function p({ className: t, status: n, icon: r, toolkitIcon: a, title: c, description: d, children: f, ...p }) {
	return /* @__PURE__ */ o(i, {
		className: "px-3 pt-3 pb-0",
		children: /* @__PURE__ */ s("div", {
			className: e("flex items-start gap-3 sm:items-center", t),
			"data-slot": "tool-authorization-header",
			...p,
			children: [
				r && /* @__PURE__ */ o("div", {
					className: e(l({ status: n })),
					children: /* @__PURE__ */ o(r, { className: e(u({ status: n })) })
				}),
				(c || d) && /* @__PURE__ */ s("div", { children: [c && /* @__PURE__ */ s("h3", {
					className: "flex items-center gap-1.5 font-medium text-card-foreground text-sm",
					children: [a && /* @__PURE__ */ o(a, { className: "size-4 shrink-0" }), c]
				}), d && /* @__PURE__ */ o("p", {
					className: "mt-0.5 text-muted-foreground text-xs",
					children: d
				})] }),
				f
			]
		})
	});
}
function m({ className: t, ...n }) {
	return /* @__PURE__ */ o(r, {
		className: "p-3 pt-2",
		children: /* @__PURE__ */ o("div", {
			className: e("flex flex-col gap-2", t),
			"data-slot": "tool-authorization-content",
			...n
		})
	});
}
function h({ className: t, status: n, ...r }) {
	return /* @__PURE__ */ o("div", {
		className: e(d({ status: n }), "items-start sm:items-center", t),
		"data-slot": "tool-authorization-message",
		...r
	});
}
function g({ args: t, className: n, ...r }) {
	return Object.keys(t).length === 0 ? null : /* @__PURE__ */ s("div", {
		className: e("w-full rounded-lg bg-muted p-2 sm:p-2.5", n),
		"data-slot": "tool-authorization-args",
		...r,
		children: [/* @__PURE__ */ o("h4", {
			className: "mb-1 font-medium text-xs",
			children: "Tool Arguments:"
		}), /* @__PURE__ */ o(a, {
			className: "text-[11px] sm:text-xs",
			code: JSON.stringify(t, null, 2)
		})]
	});
}
//#endregion
export { f as ToolAuthorization, g as ToolAuthorizationArgs, m as ToolAuthorizationContent, p as ToolAuthorizationHeader, h as ToolAuthorizationMessage };
