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