/**
 * Custom query hook for currentUserAgent
 * @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 currentUserAgentQueryKey = customQueryKeys.currentUserAgent;
export function useCurrentUserAgentQuery(params) {
    const queryOptions = params ?? {};
    return useQuery({
        queryKey: currentUserAgentQueryKey(),
        queryFn: () => getClient().query.currentUserAgent().unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch currentUserAgent without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchCurrentUserAgentQuery();
 * ```
 */
export async function fetchCurrentUserAgentQuery() {
    return getClient().query.currentUserAgent().unwrap();
}
/**
 * Prefetch currentUserAgent for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchCurrentUserAgentQuery(queryClient);
 * ```
 */
export async function prefetchCurrentUserAgentQuery(queryClient) {
    await queryClient.prefetchQuery({
        queryKey: currentUserAgentQueryKey(),
        queryFn: () => getClient().query.currentUserAgent().unwrap(),
    });
}
