// import request from '@/utils/request';
import { useHttp } from '@crami/http';

export interface fileUpload {
  file: string;
  filePath: string;
  fileShowName: string;
}
export async function FileUploadAPI(data: any) {
  return await useHttp({
    url: '/api/file/applicationFile/upload',
    method: 'post',
    data,
  });
}

export interface downloadUrl {
  fileId: string;
}
export async function downloadUrlAPI(fileId: string) {
  return await useHttp({
    url: `/api/file/applicationFile/template/downloadUrl/${fileId}`,
    method: 'get',
  });
}

export interface soleData {
  Data: {
    coding: string;
  };
  NewObject: boolean;
  connect: string;
  lang: string;
  objectID: string;
  objectType: string;
}
export async function soleDataAPI(data: soleData) {
  return await useHttp({
    url: '/api/system/model/CheckObjectUnique',
    method: 'post',
    data,
  });
}
