import { http } from '../http'

interface StrangeWordParams {
  current?: number
  size?: number
  textbookId?: string
  [key: string]: any
}

/*
 ** 生词本
 */
const wordBookApi = {
  // 获取生词本
  getStrangeWord: (params: StrangeWordParams) =>
    http.request({
      url: '/userStrangeWord/list',
      params,
    }),

  // 生词本删除
  deleteStrangeWord: (id: any) =>
    http.request({
      url: `/userStrangeWord/deleteBatch?ids=${id}`,
      method: 'DELETE',
    }),
}

export default wordBookApi

export type { StrangeWordParams }
