import { defHttp } from '@/utils/http/axios';
import {
  DemoOptionsItem,
  OrgItemList,
  TabDataItem,
  CaseCollectionItem,
  GetBaseItem,
  CaseCollectionDelItem,
  GetBaseIdItem,
  GetBaseUidItem,
  GetCaseDealItem,
  CaseBackItem,
} from './model/index';

enum Api {
  GETORG_List = '/api/Orgs/OrgList', //组织机构字典
  GETTABLEDATA_LIST = '/api/DroneCaseinfo/LoadWaitToVerifyCaseList', //表格列表数据
  ADDCASE_COLLECTION = '/api/DroneCaseinfo/AddCaseFavorite', //添加收藏案件
  DELCASE_COLLECTION = '/api/DroneCaseinfo/DeleteFavoriteCases', //移除收藏
  GETCOLLECTION_LIST = '/api/DroneCaseinfo/LoadFavoriteCases', //收藏列表
  GETUSERINFO = '/api/DroneCaseinfo/GetCurrentUser', //获取当前用户信息
  GETCASE_DETAIL = '/api/DroneCaseinfo/GetCaseInfo', //获取案件详情
  GETCASELIST = '/api/DroneCaseinfo/FavoriteCaseList', //全部收藏案件数据
  GETCASEDEAL = '/api/DroneCaseinfo/GetDroneCaseDeal', //审核详情
  CASE_AUDITING = '/api/DroneCaseinfo/VerfiyCaseData', //案件通过审核
  CASE_BACK = '/api/DroneCaseinfo/DrawbackCase', //案件退回
}
/**
 * @description: Get sample options value
 */
export const getUserOrg = (params?: OrgItemList) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETORG_List, params });
export const getUserInfoData = (params?: OrgItemList) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETUSERINFO, params });
export const getTableDataList = (params?: TabDataItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETTABLEDATA_LIST, params });
export const addCaseCollection = (params?: CaseCollectionItem) =>
  defHttp.post<DemoOptionsItem[]>({ url: Api.ADDCASE_COLLECTION, params });
export const delCaseCollection = (params?: CaseCollectionDelItem) =>
  defHttp.post<DemoOptionsItem[]>({ url: Api.DELCASE_COLLECTION, params });
export const getCollectionCaseList = (params?: GetBaseItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETCOLLECTION_LIST, params });
export const getCaseDataDetail = (params?: GetBaseIdItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETCASE_DETAIL, params });
export const getCaseList = (params?: GetBaseUidItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETCASELIST, params });
export const getCaseDealDetail = (params?: GetCaseDealItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.GETCASEDEAL, params });
export const caseAudiSteps = (params?: GetBaseIdItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.CASE_AUDITING, params });
export const caseBackSteps = (params?: CaseBackItem) =>
  defHttp.get<DemoOptionsItem[]>({ url: Api.CASE_BACK, params });
