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