/**
 * Shared system prompt templates for agent conversations
 * @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 { agentPromptKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const agentPromptsQueryKey = agentPromptKeys.list;
export function useAgentPromptsQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: agentPromptKeys.list(args),
        queryFn: () => getClient().agentPrompt.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchAgentPromptsQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().agentPrompt.findMany(args).unwrap();
}
export async function prefetchAgentPromptsQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: agentPromptKeys.list(args),
        queryFn: () => getClient().agentPrompt.findMany(args).unwrap(),
    });
}
