import { cn } from "../../../lib/utils.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { CheckCircle, File, Play } from "lucide-react";
var NavigationItem_default = (s) => {
	let l = c(25), { workflow: u, isSelected: d, navigateTo: f } = s, p = u.place === "end", m = !p && (u.progress ?? 0) > 0, h;
	l[0] !== p || l[1] !== m ? (h = () => p ? /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4 flex-shrink-0 text-green-500" }) : m ? /* @__PURE__ */ jsx(Play, { className: "h-4 w-4 flex-shrink-0 text-blue-500" }) : /* @__PURE__ */ jsx(File, { className: "h-4 w-4 flex-shrink-0 text-gray-500" }), l[0] = p, l[1] = m, l[2] = h) : h = l[2];
	let g = h, _;
	l[3] !== p || l[4] !== u.progress ? (_ = () => !p && (u.progress ?? 0) > 0 ? /* @__PURE__ */ jsx("div", {
		className: "ml-auto",
		children: /* @__PURE__ */ jsx("div", {
			className: "relative h-4 w-4",
			children: /* @__PURE__ */ jsxs("svg", {
				className: "h-4 w-4 -rotate-90 transform",
				viewBox: "0 0 32 32",
				children: [/* @__PURE__ */ jsx("circle", {
					cx: "16",
					cy: "16",
					r: "12",
					stroke: "currentColor",
					strokeWidth: "3",
					fill: "none",
					className: "text-gray-300"
				}), /* @__PURE__ */ jsx("circle", {
					cx: "16",
					cy: "16",
					r: "12",
					stroke: "currentColor",
					strokeWidth: "3",
					fill: "none",
					strokeDasharray: `${(u.progress ?? 0) * .75} 75`,
					className: "text-blue-500"
				})]
			})
		})
	}) : null, l[3] = p, l[4] = u.progress, l[5] = _) : _ = l[5];
	let v = _, y;
	l[6] !== f || l[7] !== u.id ? (y = (r) => {
		r.preventDefault(), r.stopPropagation(), f(u.id);
	}, l[6] = f, l[7] = u.id, l[8] = y) : y = l[8];
	let b = y, x;
	l[9] === d ? x = l[10] : (x = cn("hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-sidebar-ring flex w-full cursor-pointer items-center justify-between rounded-md p-2 text-left text-sm outline-hidden transition-colors focus-visible:ring-2", { "bg-sidebar-accent text-sidebar-accent-foreground font-medium": d }), l[9] = d, l[10] = x);
	let S;
	l[11] === g ? S = l[12] : (S = g(), l[11] = g, l[12] = S);
	let C = u.title ?? u.blockName, w;
	l[13] === C ? w = l[14] : (w = /* @__PURE__ */ jsx("span", {
		className: "truncate text-sm",
		children: C
	}), l[13] = C, l[14] = w);
	let T;
	l[15] !== S || l[16] !== w ? (T = /* @__PURE__ */ jsxs("div", {
		className: "flex min-w-0 items-center gap-2",
		children: [S, w]
	}), l[15] = S, l[16] = w, l[17] = T) : T = l[17];
	let E;
	l[18] === v ? E = l[19] : (E = v(), l[18] = v, l[19] = E);
	let D;
	return l[20] !== b || l[21] !== x || l[22] !== T || l[23] !== E ? (D = /* @__PURE__ */ jsx("div", {
		className: "relative",
		children: /* @__PURE__ */ jsxs("button", {
			onClick: b,
			className: x,
			children: [T, E]
		})
	}), l[20] = b, l[21] = x, l[22] = T, l[23] = E, l[24] = D) : D = l[24], D;
};
export { NavigationItem_default as default };
