import { useRequest } from '@/use/useHttp'

/**
 *  获取面料分类列表
 * @returns
 */
export const GetCategoryList = () => {
  return useRequest({
    url: '/v1/mall/category/list',
    method: 'get',
  })
}

/**
 *  获取面料种类列表
 * @returns
 */
export const GetProductKindListApi = () => {
  return useRequest({
    url: '/v2/mall/product/kind/list',
    method: 'get',
  })
}

/**
 *  获取面料列表
 * @returns
 */
export const GetProductListApi = () => {
  return useRequest({
    url: '/v2/mall/product/list',
    method: 'get',
  })
}

/**
 * 获取面料种类子分类
 */
export const GetClassList = () => {
  return useRequest({
    url: '/v2/mall/product/kind/sub/list',
    method: 'get',
  })
}

/**
 *  获取面料详情
 * @returns
 */
export const GetProductDetailApi = () => {
  return useRequest({
    url: '/v1/mall/product',
    method: 'get',
  })
}

/**
 *  根据LAB匹配色卡基础资料
 * @returns
 */
export const GetLabProductApi = () => {
  return useRequest({
    url: '/v1/mall/product/color/absorb/match',
    method: 'get',
  })
}

/**
 *  收藏面料
 * @returns
 */
// export const GetProductDetailApi = () => {
//     return useRequest({
//         url: `/v1/mall/product`,
//         method: "get",
//     })
// }

// 删除历史搜索
export const mallsearchHistorydelete = () => {
  return useRequest({
    url: '/v2/mall/searchHistory/delete',
    method: 'delete',
  })
}
