/**
 * App-scoped PGP-encrypted internal secrets store. No namespace_module dependency and no K8s synchronization. Used by identity_providers_module for OAuth2 client_secret storage.
 * @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 { internalSecretsModuleKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const internalSecretsModulesQueryKey = internalSecretsModuleKeys.list;
export function useInternalSecretsModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: internalSecretsModuleKeys.list(args),
        queryFn: () => getClient().internalSecretsModule.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchInternalSecretsModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().internalSecretsModule.findMany(args).unwrap();
}
export async function prefetchInternalSecretsModulesQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: internalSecretsModuleKeys.list(args),
        queryFn: () => getClient().internalSecretsModule.findMany(args).unwrap(),
    });
}
