/**
 * List query hook for CryptoAddressesModule
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { useQuery } from '@tanstack/react-query';
import { getClient } from '../client';
import { buildListSelectionArgs } from '../selection';
import { cryptoAddressesModuleKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const cryptoAddressesModulesQueryKey = cryptoAddressesModuleKeys.list;
export function useCryptoAddressesModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: cryptoAddressesModuleKeys.list(args),
        queryFn: () => getClient().cryptoAddressesModule.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchCryptoAddressesModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().cryptoAddressesModule.findMany(args).unwrap();
}
export async function prefetchCryptoAddressesModulesQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: cryptoAddressesModuleKeys.list(args),
        queryFn: () => getClient().cryptoAddressesModule.findMany(args).unwrap(),
    });
}
