/**
 * Custom query hook for resolveBlueprintTable
 * @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 resolveBlueprintTableQueryKey = customQueryKeys.resolveBlueprintTable;
export function useResolveBlueprintTableQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: resolveBlueprintTableQueryKey(variables),
        queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch resolveBlueprintTable without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchResolveBlueprintTableQuery({ variables: { databaseId, tableName, schemaName, tableMap, defaultSchemaId } });
 * ```
 */
export async function fetchResolveBlueprintTableQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.resolveBlueprintTable(variables).unwrap();
}
/**
 * Prefetch resolveBlueprintTable for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchResolveBlueprintTableQuery(queryClient, { variables: { databaseId, tableName, schemaName, tableMap, defaultSchemaId } });
 * ```
 */
export async function prefetchResolveBlueprintTableQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: resolveBlueprintTableQueryKey(variables),
        queryFn: () => getClient().query.resolveBlueprintTable(variables).unwrap(),
    });
}
