/**
 * On-demand resource status checks — diagnostic snapshots from the runtime (K8s status, conditions, log tails)
 * @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 { platformResourceStatusCheckKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const platformResourceStatusChecksQueryKey = platformResourceStatusCheckKeys.list;
export function usePlatformResourceStatusChecksQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: platformResourceStatusCheckKeys.list(args),
        queryFn: () => getClient().platformResourceStatusCheck.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchPlatformResourceStatusChecksQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().platformResourceStatusCheck.findMany(args).unwrap();
}
export async function prefetchPlatformResourceStatusChecksQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: platformResourceStatusCheckKeys.list(args),
        queryFn: () => getClient().platformResourceStatusCheck.findMany(args).unwrap(),
    });
}
