/**
 * Custom query hook for stepsAchieved
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { useQuery } from '@tanstack/react-query';
import { getClient } from '../client';
import { customQueryKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const stepsAchievedQueryKey = customQueryKeys.stepsAchieved;
export function useStepsAchievedQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: stepsAchievedQueryKey(variables),
        queryFn: () => getClient().query.stepsAchieved(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch stepsAchieved without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchStepsAchievedQuery({ variables: { level, roleId } });
 * ```
 */
export async function fetchStepsAchievedQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.stepsAchieved(variables).unwrap();
}
/**
 * Prefetch stepsAchieved for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchStepsAchievedQuery(queryClient, { variables: { level, roleId } });
 * ```
 */
export async function prefetchStepsAchievedQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: stepsAchievedQueryKey(variables),
        queryFn: () => getClient().query.stepsAchieved(variables).unwrap(),
    });
}
