import { ScrollArea } from "../../components/ui/scroll-area.js";
import RunItem_default from "./RunItem.js";
import { c } from "react/compiler-runtime";
import { jsx } from "react/jsx-runtime";
function RunsList(i) {
	let a = c(11), { type: o, runs: s, router: l, emptyMessage: u } = i;
	if (s.length === 0) {
		let e;
		return a[0] === u ? e = a[1] : (e = /* @__PURE__ */ jsx("p", {
			className: "text-muted-foreground",
			children: u
		}), a[0] = u, a[1] = e), e;
	}
	let d;
	if (a[2] !== l || a[3] !== s || a[4] !== o) {
		let e;
		a[6] !== l || a[7] !== o ? (e = (e) => /* @__PURE__ */ jsx(RunItem_default, {
			run: e,
			router: l
		}, `${o}-${e.id}`), a[6] = l, a[7] = o, a[8] = e) : e = a[8], d = s.map(e), a[2] = l, a[3] = s, a[4] = o, a[5] = d;
	} else d = a[5];
	let f;
	return a[9] === d ? f = a[10] : (f = /* @__PURE__ */ jsx(ScrollArea, {
		className: "h-75 w-full",
		children: /* @__PURE__ */ jsx("div", {
			className: "space-y-2 pr-2",
			children: d
		})
	}), a[9] = d, a[10] = f), f;
}
var RunList_default = RunsList;
export { RunList_default as default };
