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