import { defHttp } from '@/utils/http/axios';
enum Api {
  GetUavList = '/api/Manage/GetUavList',
  AddWorkspace = '/api/Manage/AddWorkspace',
  GetWorkspaceList = '/api/Manage/GetWorkspaceList',
  GetWorkSpaceById = '/api/Manage/GetWorkSpaceById',
  EditWorkspace = '/api/Manage/EditWorkspace',
  DeleteWorkspace = '/api/Manage/DeleteWorkspace',
}

export function GetUavList(params?) {
  return defHttp.get({
    url: Api.GetUavList,
    params
  });
}
export function AddWorkspace(params) {
  return defHttp.post({
    url: Api.AddWorkspace,
    params
  });
}
export function EditWorkspace(params) {
  return defHttp.post({
    url: Api.EditWorkspace,
    params
  });
}
export function DeleteWorkspace(params: { id: string }) {
  return defHttp.post({
    url: `${Api.DeleteWorkspace}?id=${params.id}`,
    params,
  });
}
export function GetWorkspaceList(params?) {
  return defHttp.get({
    url: Api.GetWorkspaceList,
    params
  });
}
export function GetWorkSpaceById(params: { id: string }) {
  return defHttp.get({
    url: Api.GetWorkSpaceById,
    params
  });
}