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

/**
 * @description: 获取句子文件列表
 * @param {*} id
 * @return {*}
 */
export const getSentenceFileDetailList = async (
  id: string,
  params: Record<string, any>,
) => {
  return await get<any>(`/sentenceFile/list/${id}`, params)
}

/**
 * @description: 修改句子文件列表
 * @param {*} data
 * @return {*}
 */
export const putSentenceContentConfig = async (data: Record<string, any>) => {
  return await put('/sentenceFileContentConfig', data)
}

/**
 * @description: 剪裁视频
 * @param {*} params
 * @return {*}
 */
export const cutVideo = async (params: Record<string, any>) => {
  return await get<any>('/sentenceFile/cropping', params)
}
/**
 * @description: 删除句子
 * @param {*} params
 * @return {*}
 */
export const deleteSentenceContentConfig = async (id: string) => {
  return await del(`/sentenceFileContentConfig/${id}`)
}

/**
 * @description: 例句合并
 * @param {*} data
 * @return {*}
 */
export const concatSentenceContentConfig = async (
  data: Record<string, any>,
) => {
  return await post<any>('/sentenceFileContent/mergeContent', data)
}

/**
 * @description: 新增句子文件列表
 * @param {*} data
 * @return {*}
 */
export const addSentenceContentConfig = async (data: Record<string, any>) => {
  return await post<any>('/sentenceFileContentConfig', data)
}

/**
 * @description: 修改句子内容、释义
 * @param {*} data
 * @return {*}
 */
export const putSentenceFileContent = async (data: Record<string, any>) => {
  return await put('/sentenceFileContent', data)
}

/**
 * @description: 新增例句文件列表
 * @param {*} data
 * @return {*}
 */
export const addSentenceFileContent = async (data: Record<string, any>) => {
  return await post<any>('/sentenceFileContent', data)
}

/**
 * @description: 例句文件内容表-通过id删除
 * @param {*} data
 * @return {*}
 */
export const delSentenceFileContent = async (id: string) => {
  return await del(`/sentenceFileContent/${id}`)
}
/**
 * @description: 撤回上次审核过的句子
 * @param {*} data
 * @returns {*}
 */

export const cancelSentenceFileContentcallbackCheck = async (
  data: Record<string, any>,
) => {
  return await post<any>('/sentenceFileContentConfig/callbackCheck', data)
}
