import { useMyRequest } from '~/composables/useFetchRequest'

enum Api {
  StaticData = '/client/dashboard/count',
  CollectionGoodsList = '/client/merchandise/favorite',
  CollectBrandsListApi = '/client/brand/favorite',
  RFQsListApi = '/client/rfq/list',
  SubmitRFQsApi = '/client/rfq/submit',
  RFQsDetailApi = '/client/rfq/detail',
}

/**
 * 个人中心获取数据统计
 * @param params
 * @returns
 */
export async function getStaticDataApi(params?: any) {
  return await useMyRequest().get(Api.StaticData, params)
}

/**
 * 获取收藏列表
 * @param params
 * @returns
 */
export async function getCollectionGoodsListApi(params?: any) {
  return await useMyRequest().get(Api.CollectionGoodsList, params)
}
/**
 * 获取收藏列表
 * @param params
 * @returns
 */
export async function getCollectBrandsListApi(params?: any) {
  return await useMyRequest().get(Api.CollectBrandsListApi, params)
}
/**
 * 获取rfq列表
 * @param params
 * @returns
 */
export async function getRFQsListApi(params?: any) {
  return await useMyRequest().get(Api.RFQsListApi, params)
}
/**
 * 获取rfq详情
 * @param params
 * @returns
 */
export async function getRFQsDetailApi(params?: any) {
  return await useMyRequest().get(Api.RFQsDetailApi, params)
}
/**
 * 提交 rfqs
 * @param params
 * @returns
 */
export async function submitRFQsApiApi(params?: any) {
  return await useMyRequest().post(Api.SubmitRFQsApi, params)
}
