"use strict";
/**
 * Custom query hook for currentUserAgent
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.currentUserAgentQueryKey = void 0;
exports.useCurrentUserAgentQuery = useCurrentUserAgentQuery;
exports.fetchCurrentUserAgentQuery = fetchCurrentUserAgentQuery;
exports.prefetchCurrentUserAgentQuery = prefetchCurrentUserAgentQuery;
const react_query_1 = require("@tanstack/react-query");
const client_1 = require("../client");
const query_keys_1 = require("../query-keys");
/** Query key factory - re-exported from query-keys.ts */
exports.currentUserAgentQueryKey = query_keys_1.customQueryKeys.currentUserAgent;
function useCurrentUserAgentQuery(params) {
    const queryOptions = params ?? {};
    return (0, react_query_1.useQuery)({
        queryKey: (0, exports.currentUserAgentQueryKey)(),
        queryFn: () => (0, client_1.getClient)().query.currentUserAgent().unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch currentUserAgent without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchCurrentUserAgentQuery();
 * ```
 */
async function fetchCurrentUserAgentQuery() {
    return (0, client_1.getClient)().query.currentUserAgent().unwrap();
}
/**
 * Prefetch currentUserAgent for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchCurrentUserAgentQuery(queryClient);
 * ```
 */
async function prefetchCurrentUserAgentQuery(queryClient) {
    await queryClient.prefetchQuery({
        queryKey: (0, exports.currentUserAgentQueryKey)(),
        queryFn: () => (0, client_1.getClient)().query.currentUserAgent().unwrap(),
    });
}
