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