require("./chunk-9hOWP6kD.cjs");
const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-Bpm-CZq1.cjs");
const require_query_keys = require("./query-keys-elu0svUd.cjs");
let _tanstack_react_query = require("@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 = require_PortalTenantClientProvider.useAccountApi();
	return (0, _tanstack_react_query.useQuery)({
		queryKey: require_query_keys.accountKeys.detail(),
		queryFn: async () => {
			return (await api.fetchAccount()).account;
		},
		staleTime: 300 * 1e3
	});
}
//#endregion
Object.defineProperty(exports, "useAccount", {
	enumerable: true,
	get: function() {
		return useAccount;
	}
});

//# sourceMappingURL=use-account-CQ-mhA3W.cjs.map