/**
 * Custom query hook for appPermissionsGetByMask
 * @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 appPermissionsGetByMaskQueryKey = customQueryKeys.appPermissionsGetByMask;
export function useAppPermissionsGetByMaskQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: appPermissionsGetByMaskQueryKey(variables),
        queryFn: () => getClient().query.appPermissionsGetByMask(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch appPermissionsGetByMask without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchAppPermissionsGetByMaskQuery({ variables: { mask, first, offset, after } });
 * ```
 */
export async function fetchAppPermissionsGetByMaskQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.appPermissionsGetByMask(variables).unwrap();
}
/**
 * Prefetch appPermissionsGetByMask for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchAppPermissionsGetByMaskQuery(queryClient, { variables: { mask, first, offset, after } });
 * ```
 */
export async function prefetchAppPermissionsGetByMaskQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: appPermissionsGetByMaskQueryKey(variables),
        queryFn: () => getClient().query.appPermissionsGetByMask(variables).unwrap(),
    });
}
