import { defHttp } from '/@/utils/http/axios';
import {
  PageParams,
  operateList,
  sceneMoveParams,
  sceneControlParams,
  RentListGetResultModel,
  checkDownLoadResult,
  sceneDownloadResult,
  ResultDetail,
  addCameraParams,
  updateParams,
} from './model';
import { Result } from '/#/axios';

enum Api {
  pageList = '/manage/service/manage/news/pageNews',
  newDisplay = '/manage/service/manage/news/display',
  newPutTop = '/manage/service/manage/news/putTop',
  newUpdateNews = '/manage/service/manage/news/updateNews',
  newAddNews = '/manage/service/manage/news/addNews',
  newDelete = '/manage/service/manage/news/delete',
  publicNews = '/manage/service/manage/news/publicNews',
  newGetNewsDetail = '/manage/service/manage/news/getNewsDetail',
  //招聘
  employNoteList = '/manage/service/manage/employNote/list',
  addOrUpdate = '/manage/service/manage/employNote/addOrUpdate',
  employNoteDelete = '/manage/service/manage/employNote/delete',
  employNoteIsPush = '/manage/service/manage/employNote/isPush',
  employNoteIsTop = '/manage/service/manage/employNote/isTop',
  //留言
  intercomMessageList = '/manage/service/manage/intercomMessage/list',
  intercomMessageHandle = '/manage/service/manage/intercomMessage/handle',

  operateSceneList = '/manage/service/manage/scene/list',
  sceneMove = '/manage/service/manage/scene/move',
  sceneDelete = '/manage/service/manage/scene/delete',
  sceneDownload = '/manage/service/manage/scene/downScene',
  sceneCopy = '/manage/service/manage/scene/copy',
  checkDownLoad = '/manage/service/manage/scene/checkDownLoad',
  downloadProcess = '/manage/service/manage/scene/downloadProcess',
  rebuildScene = '/manage/service/manage/scene/rebuildScene',
  overallList = '/manage/service/manage/overall/list',
  overallDelete = '/manage/service/manage/overall/delete',
}

/**
 * @description: Get sample list value
 */

export const ListApi = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.pageList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//显示隐藏
export const NewDisplay = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDisplay,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/修改是否置顶
export const NewPutTop = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newPutTop,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//新闻管理/获取新闻详情
export const NewsDetail = (params: PageParams) =>
  defHttp.post<ResultDetail>({
    url: Api.newGetNewsDetail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/修改是否发布
export const NewPublicNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.publicNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newAddNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newAddNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newUpdateNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newUpdateNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const operateSceneList = (params: operateList) =>
  defHttp.post<Result>({
    url: Api.operateSceneList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallList = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallDelete = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneMove = (params: sceneMoveParams) =>
  defHttp.post<Result>({
    url: Api.sceneMove,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const rebuildScene = (params: sceneControlParams) =>
  defHttp.get<Result>({
    url: Api.rebuildScene,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDelete = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const checkDownLoad = (params: sceneControlParams) =>
  defHttp.get<checkDownLoadResult>({
    url: Api.checkDownLoad,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDownload = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.sceneDownload,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const downloadProcess = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.downloadProcess,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneCopy = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneCopy,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/列表
export const employNoteList = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/新增或修改
export const addOrUpdate = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.addOrUpdate,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 招聘管理/删除
export const employNoteDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteDelete,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/发布撤回
export const employNoteIsPush = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsPush,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/置顶撤回
export const employNoteIsTop = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsTop,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageList = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageHandle = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageHandle,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });