import { del, get, post, put } from '../../http'

/**
 * @description: 获取词汇分级列表
 * @param {*} params
 * @return {*}
 */
export const getWordClassList = async (params?: Record<string, any>) => {
  return await get<any>('/vocabulary/list', params)
}
/**
 * @description: 新增词汇分级
 * @param {*} params
 * @return {*}
 */
export const addWordClass = async (data: Record<string, any>) => {
  return await post<any>('/vocabulary', data)
}
/**
 * @description: 更新词汇分级
 * @param {*} params
 * @return {*}
 */
export const updateWordClass = async (data: Record<string, any>) => {
  return await put('/vocabulary', data)
}
/**
 * @description: 删除词汇分级
 * @param {*} params
 * @return {*}
 */
export const deleteWordClass = async (id: string) => {
  return await del(`/vocabulary/${id}`)
}
/**
 * @description: 获取词汇单词列表
 * @param {*} params
 * @return {*}
 */
export const getWordList = async (params: Record<string, any>) => {
  return await get<any>('/vocabularyWord/list', params)
}
/**
 * @description: 更新词汇列表状态
 * @param {*} params
 * @return {*}
 */
export const updateWordList = async (data: Record<string, any>) => {
  return await put('/vocabularyWord', data)
}
/**
 * @description: 新增词汇列表
 * @param {*} params
 * @return {*}
 */
export const addWordList = async (data: Record<string, any>) => {
  return await post<any>('/vocabularyWord', data)
}
