import { j as useAccountApi } from "./portal_tenant-l4a-eX2B.mjs";
import { t as accountKeys } from "./query-keys-BkMRwfNo.mjs";
import { useQuery } from "@tanstack/react-query";
//#region src/hooks/use-account.ts
/**
* Fetches the current user's account from GET /api/account.
* Replaces the old useCurrentUser (which called non-existent /api/me).
*/
function useAccount() {
	const api = useAccountApi();
	return useQuery({
		queryKey: accountKeys.detail(),
		queryFn: async () => {
			return (await api.fetchAccount()).account;
		},
		staleTime: 300 * 1e3
	});
}
//#endregion
export { useAccount as t };

//# sourceMappingURL=use-account-B201ntr4.mjs.map