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