import request from '@/config/axios'

export interface QuickRepliesVO {
  id: number
  groupId: number
  content: string
  needTranslation: boolean
}

// 查询快捷回复列表
export const getQuickRepliesPage = async (params) => {
  return await request.get({ url: `/message/quick-replies/page`, params })
}

// 查询快捷回复详情
export const getQuickReplies = async (id: number) => {
  return await request.get({ url: `/message/quick-replies/get?id=` + id })
}

// 新增快捷回复
export const createQuickReplies = async (data: QuickRepliesVO) => {
  return await request.post({ url: `/message/quick-replies/create`, data })
}

// 修改快捷回复
export const updateQuickReplies = async (data: QuickRepliesVO) => {
  return await request.put({ url: `/message/quick-replies/update`, data })
}

// 删除快捷回复
export const deleteQuickReplies = async (id: number) => {
  return await request.delete({ url: `/message/quick-replies/delete?id=` + id })
}

// 导出快捷回复 Excel
export const exportQuickReplies = async (params) => {
  return await request.download({ url: `/message/quick-replies/export-excel`, params })
}
