import { useQuery } from '@tanstack/vue-query'
import { getModelOperationsPlan } from './api'

export const modelOperationsKeys = {
  all: ['model-operations'] as const,
  plan: () => [...modelOperationsKeys.all, 'plan'] as const
}

export function useModelOperationsPlanQuery() {
  return useQuery({
    queryKey: modelOperationsKeys.plan(),
    queryFn: getModelOperationsPlan,
    staleTime: 5 * 60 * 1000,
    retry: 1
  })
}
