// 短文剪辑、短文库接口

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

/**
 * @description: 查询短文列表
 * @param {*} params
 * @return {*}
 */
const getshortEssayList = async (params: Record<string, any>) => {
  return await get<any>('/sentenceFile/list', params)
}

/**
 * @description: 合并短文
 * @param {*} id
 * @return {*}
 */
const handleMergeEssayContent = async (data: Record<string, any>) => {
  return await post<any>('/sentenceFileContent/mergeEssayContent', data)
}

/**
 * @description: id查询-获取短文详情
 * @param {*} id
 * @return {*}
 */
const getSentenceDialogueEssayWithBindWord = async (
  id: string,
  params?: Record<string, any>,
) => {
  return await get<any>(`/sentenceDialogue/essayWithBindWord/${id}`, params)
}

const shortEssayApi = {
  getshortEssayList,
  handleMergeEssayContent,
  getSentenceDialogueEssayWithBindWord,
}

export default shortEssayApi
