/**
 * Custom query hook for stepsRequired
 * @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 stepsRequiredQueryKey = customQueryKeys.stepsRequired;
export function useStepsRequiredQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: stepsRequiredQueryKey(variables),
        queryFn: () => getClient().query.stepsRequired(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch stepsRequired without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchStepsRequiredQuery({ variables: { level, roleId, first, offset, after } });
 * ```
 */
export async function fetchStepsRequiredQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.stepsRequired(variables).unwrap();
}
/**
 * Prefetch stepsRequired for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchStepsRequiredQuery(queryClient, { variables: { level, roleId, first, offset, after } });
 * ```
 */
export async function prefetchStepsRequiredQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: stepsRequiredQueryKey(variables),
        queryFn: () => getClient().query.stepsRequired(variables).unwrap(),
    });
}
