"use strict";
/**
 * Custom query hook for revParse
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.revParseQueryKey = void 0;
exports.useRevParseQuery = useRevParseQuery;
exports.fetchRevParseQuery = fetchRevParseQuery;
exports.prefetchRevParseQuery = prefetchRevParseQuery;
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.revParseQueryKey = query_keys_1.customQueryKeys.revParse;
function useRevParseQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return (0, react_query_1.useQuery)({
        queryKey: (0, exports.revParseQueryKey)(variables),
        queryFn: () => (0, client_1.getClient)().query.revParse(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch revParse without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchRevParseQuery({ variables: { dbId, storeId, refname } });
 * ```
 */
async function fetchRevParseQuery(params) {
    const variables = params?.variables ?? {};
    return (0, client_1.getClient)().query.revParse(variables).unwrap();
}
/**
 * Prefetch revParse for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchRevParseQuery(queryClient, { variables: { dbId, storeId, refname } });
 * ```
 */
async function prefetchRevParseQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: (0, exports.revParseQueryKey)(variables),
        queryFn: () => (0, client_1.getClient)().query.revParse(variables).unwrap(),
    });
}
