import { useStudio as e } from "../providers/StudioProvider.js";
import { useWorkspace as t } from "../hooks/useWorkspaces.js";
import n from "../components/layout/MainLayout.js";
import r from "../components/feedback/ErrorSnackbar.js";
import i from "../features/workspaces/components/ExecutionTimeline.js";
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
import { useParams as c } from "react-router-dom";
import { Home as l, Loader2 as u } from "lucide-react";
//#region src/pages/WorkspaceRunsPage.tsx
var d = () => {
	let { router: d } = e(), { workspaceId: f } = c(), p = t(f);
	return /* @__PURE__ */ o(n, {
		breadcrumbsData: [
			{
				label: "Dashboard",
				href: d.getDashboard(),
				icon: /* @__PURE__ */ o(l, { className: "h-4 w-4" })
			},
			{
				label: "Workspaces",
				href: d.getWorkspaces()
			},
			{
				label: p.data?.title ?? "",
				href: f ? d.getWorkspace(f) : void 0
			},
			{
				label: "Runs",
				current: !0
			}
		],
		children: /* @__PURE__ */ s(a, { children: [
			/* @__PURE__ */ s("h1", {
				className: "mb-4 text-3xl font-bold tracking-tight",
				children: [p.data?.title ?? "", " — Runs"]
			}),
			p.isLoading ? /* @__PURE__ */ o(u, { className: "h-6 w-6 animate-spin" }) : "",
			/* @__PURE__ */ o(r, { error: p.error }),
			p.data ? /* @__PURE__ */ o(i, { workspace: p.data }) : ""
		] })
	});
};
//#endregion
export { d as default };
