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