"use strict";
/**
 * Custom query hook for currentIpAddress
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.currentIpAddressQueryKey = void 0;
exports.useCurrentIpAddressQuery = useCurrentIpAddressQuery;
exports.fetchCurrentIpAddressQuery = fetchCurrentIpAddressQuery;
exports.prefetchCurrentIpAddressQuery = prefetchCurrentIpAddressQuery;
const react_query_1 = require("@tanstack/react-query");
const client_1 = require("../client");
const query_keys_1 = require("../query-keys");
/** Query key factory - re-exported from query-keys.ts */
exports.currentIpAddressQueryKey = query_keys_1.customQueryKeys.currentIpAddress;
function useCurrentIpAddressQuery(params) {
    const queryOptions = params ?? {};
    return (0, react_query_1.useQuery)({
        queryKey: (0, exports.currentIpAddressQueryKey)(),
        queryFn: () => (0, client_1.getClient)().query.currentIpAddress().unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch currentIpAddress without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchCurrentIpAddressQuery();
 * ```
 */
async function fetchCurrentIpAddressQuery() {
    return (0, client_1.getClient)().query.currentIpAddress().unwrap();
}
/**
 * Prefetch currentIpAddress for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchCurrentIpAddressQuery(queryClient);
 * ```
 */
async function prefetchCurrentIpAddressQuery(queryClient) {
    await queryClient.prefetchQuery({
        queryKey: (0, exports.currentIpAddressQueryKey)(),
        queryFn: () => (0, client_1.getClient)().query.currentIpAddress().unwrap(),
    });
}
