import { useApiClient } from "./useApi.js";
import { c } from "react/compiler-runtime";
import { useQuery } from "@tanstack/react-query";
function useDashboardStats() {
	let r = c(7), { envKey: i, api: a } = useApiClient(), o;
	r[0] === i ? o = r[1] : (o = [
		"dashboard",
		"stats",
		i
	], r[0] = i, r[1] = o);
	let s;
	r[2] === a ? s = r[3] : (s = async () => {
		if (!a) throw Error("API not available");
		return (await a.ApiV1DashboardApi.dashboardControllerGetDashboardStats()).data;
	}, r[2] = a, r[3] = s);
	let l;
	return r[4] !== o || r[5] !== s ? (l = {
		queryKey: o,
		queryFn: s,
		enabled: !0
	}, r[4] = o, r[5] = s, r[6] = l) : l = r[6], useQuery(l);
}
export { useDashboardStats };
