import { cn as e } from "../../../lib/utils.js";
import { useWorkbenchLayout as t } from "../providers/WorkbenchLayoutProvider.js";
import { WorkbenchSecretsPanel as n } from "./WorkbenchSecretsPanel.js";
import r from "./WorkflowHistoryList.js";
import { jsx as i, jsxs as a } from "react/jsx-runtime";
import { X as o } from "lucide-react";
//#region src/features/workbench/components/WorkbenchFloatingPanel.tsx
var s = {
	history: "Run Log",
	secrets: "Secrets"
};
function c() {
	let { workflow: e } = t();
	return /* @__PURE__ */ i("div", {
		className: "overflow-auto p-2",
		children: /* @__PURE__ */ i(r, { workflow: e })
	});
}
function l() {
	let { activeFloatingPanel: r, closeFloatingPanel: l } = t();
	return r ? /* @__PURE__ */ a("div", {
		className: e("border-l bg-background absolute right-0 top-0 bottom-0 z-20 flex w-80 flex-col shadow-lg", "animate-in slide-in-from-right duration-200"),
		children: [/* @__PURE__ */ a("div", {
			className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
			children: [/* @__PURE__ */ i("span", {
				className: "text-sm font-medium",
				children: s[r]
			}), /* @__PURE__ */ i("button", {
				onClick: l,
				className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
				children: /* @__PURE__ */ i(o, { className: "h-4 w-4" })
			})]
		}), /* @__PURE__ */ a("div", {
			className: "flex-1 overflow-hidden",
			children: [r === "history" && /* @__PURE__ */ i(c, {}), r === "secrets" && /* @__PURE__ */ i(n, {})]
		})]
	}) : null;
}
//#endregion
export { l as WorkbenchFloatingPanel };
