import { api } from './client'

export interface TemplateSummary {
  id: string
  name: string
  description: string
  type: string
  provider: string
  model: string
  has_tools: boolean
  has_memory: boolean
}

export interface TemplateDetail {
  template: Record<string, unknown>
  summary: TemplateSummary
}

export const templatesApi = {
  list: () => api.get<{ templates: TemplateSummary[] }>('/templates'),
  get: (id: string) => api.get<TemplateDetail>(`/templates/${id}`),
}
