import { t as e } from "../../utils-B7XIe3qq.js";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
//#region src/react/primitives/heatmap-legend.tsx
function r({ items: r, activeFilter: i, onFilterChange: a }) {
	return /* @__PURE__ */ n("div", {
		className: "bg-surface-secondary/95 border-border-glass absolute right-4 bottom-4 z-10 rounded-lg border p-3 shadow-lg backdrop-blur-sm",
		children: [/* @__PURE__ */ t("h4", {
			className: "text-foreground-muted mb-2 text-xs font-medium tracking-wider uppercase",
			children: "Legend"
		}), /* @__PURE__ */ t("div", {
			className: "space-y-1.5",
			children: r.map((r) => {
				let o = i === r.key;
				return /* @__PURE__ */ n("button", {
					onClick: () => a(o ? null : r.key),
					className: e("flex w-full items-center gap-2.5 rounded px-2 py-1 text-left transition-all", "hover:bg-surface-tertiary/50", o && "bg-accent-primary/10 ring-accent-primary/30 ring-1"),
					children: [/* @__PURE__ */ t("div", { className: e("h-3.5 w-3.5 flex-shrink-0 rounded-[2px]", r.dot) }), /* @__PURE__ */ t("span", {
						className: "text-foreground-secondary text-xs",
						children: r.label
					})]
				}, r.key);
			})
		})]
	});
}
//#endregion
export { r as HeatmapLegend };

//# sourceMappingURL=heatmap-legend.js.map