import request from '../utils/request'

/** 列表（enabledOnly=true 时仅返回启用模板） */
export function getAgentTemplates(enabledOnly = false) {
  return request.get('/agent-templates', { params: { enabledOnly } })
}

export function getAgentTemplate(id) {
  return request.get(`/agent-templates/${id}`)
}

export function createAgentTemplate(data) {
  return request.post('/agent-templates', data)
}

export function updateAgentTemplate(id, data) {
  return request.put(`/agent-templates/${id}`, data)
}

export function deleteAgentTemplate(id) {
  return request.delete(`/agent-templates/${id}`)
}
