import { defHttp } from '/@/utils/http/axios';
import { PageParams } from './model';
import { Result } from '/#/axios';
import { getToken } from '/@/utils/auth';

const token = getToken();

enum Api {
  caseOverviewList = '/service/manage/caseOverview/list',
  caseOverviewCopy = '/service/manage/caseOverview/copy',
  caseOverviewRename = '/service/manage/caseOverview/rename',
  caseOverviewDel = '/service/manage/caseOverview/del',
  caseTabulationList = '/service/manage/caseTabulation/list',
  caseTabulationCopy = '/service/manage/caseTabulation/copy',
  caseTabulationRename = '/service/manage/caseTabulation/rename',
  caseTabulationDel = '/service/manage/caseTabulation/del',
  caseFusionAdd = '/service/manage/caseFusion/addOrUpdate',
  caseFusionList = '/service/manage/caseFusion/list',
  caseFusionMove = '/service/manage/caseFusion/move',
  caseFusionDel = '/service/manage/caseFusion/del',
  getNotAuthScene = '/service/manage/case/getNotAuthScene',
}

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

export const caseOverviewList = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.caseOverviewList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseOverviewRename = (params) =>
  defHttp.post<Result>({
    url: Api.caseOverviewRename,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseOverviewCopy = (params) =>
  defHttp.post<Result>({
    url: Api.caseOverviewCopy,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseOverviewDel = (params) =>
  defHttp.post<Result>({
    url: Api.caseOverviewDel,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseTabulationList = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.caseTabulationList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseTabulationRename = (params) =>
  defHttp.post<Result>({
    url: Api.caseTabulationRename,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseTabulationCopy = (params) =>
  defHttp.post<Result>({
    url: Api.caseTabulationCopy,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseTabulationDel = (params) =>
  defHttp.post<Result>({
    url: Api.caseTabulationDel,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseFusionAdd = (params) =>
  defHttp.post<Result>({
    url: Api.caseFusionAdd,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseFusionList = (params: PageParams) =>
  defHttp.post<Result>({
    url: Api.caseFusionList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const caseFusionMove = (params) =>
  defHttp.post<Result>({
    url: Api.caseFusionMove,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const caseFusionDel = (params) =>
  defHttp.post<Result>({
    url: Api.caseFusionDel,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const getNotAuthScene = (params) =>
  defHttp.post<Result>({
    url: Api.getNotAuthScene,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
