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