/**
 * Custom query hook for applyRegistryDefaults
 * @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 applyRegistryDefaultsQueryKey = customQueryKeys.applyRegistryDefaults;
export function useApplyRegistryDefaultsQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: applyRegistryDefaultsQueryKey(variables),
        queryFn: () => getClient().query.applyRegistryDefaults(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch applyRegistryDefaults without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchApplyRegistryDefaultsQuery({ variables: { nodeType, data } });
 * ```
 */
export async function fetchApplyRegistryDefaultsQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.applyRegistryDefaults(variables).unwrap();
}
/**
 * Prefetch applyRegistryDefaults for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchApplyRegistryDefaultsQuery(queryClient, { variables: { nodeType, data } });
 * ```
 */
export async function prefetchApplyRegistryDefaultsQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: applyRegistryDefaultsQueryKey(variables),
        queryFn: () => getClient().query.applyRegistryDefaults(variables).unwrap(),
    });
}
