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