/**
 * Custom query hook for orgIsManagerOf
 * @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 orgIsManagerOfQueryKey = customQueryKeys.orgIsManagerOf;
export function useOrgIsManagerOfQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: orgIsManagerOfQueryKey(variables),
        queryFn: () => getClient().query.orgIsManagerOf(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch orgIsManagerOf without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchOrgIsManagerOfQuery({ variables: { pEntityId, pManagerId, pUserId, pMaxDepth } });
 * ```
 */
export async function fetchOrgIsManagerOfQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.orgIsManagerOf(variables).unwrap();
}
/**
 * Prefetch orgIsManagerOf for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchOrgIsManagerOfQuery(queryClient, { variables: { pEntityId, pManagerId, pUserId, pMaxDepth } });
 * ```
 */
export async function prefetchOrgIsManagerOfQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: orgIsManagerOfQueryKey(variables),
        queryFn: () => getClient().query.orgIsManagerOf(variables).unwrap(),
    });
}
