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

/**
 *  获取所有色卡列表
 * @returns
 */
export const GetColorCardApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder/canAddCard',
    method: 'post',
  })
}

/**
 *  提交色卡
 * @returns
 */
export const SubmitColorCardApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder/submit',
    method: 'post',
  })
}

/**
 *  获取色卡订单列表
 * @returns
 */
export const GetColorCardOrderApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder/list',
    method: 'get',
  })
}

/**
 *  获取色卡订单状态列表
 * @returns
 */
export const GetColorCardOrderStatusApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder/enum/auditStatus',
    method: 'get',
  })
}

/**
 *  取消订单
 * @returns
 */
export const ColorCardOrderCancelApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder/cancel',
    method: 'post',
  })
}

/**
 *  获取色卡订单详情
 * @returns
 */
export const GetColorCardOrderDetailApi = () => {
  return request({
    url: '/v1/mall/colorCardOrder',
    method: 'get',
  })
}

/**
 *  获取该面料是否绑定色卡
 * @returns
 */
export const GetColorCardOrderByProductApi = () => {
  return request({
    url: '/v1/mall/product/colorCard',
    method: 'get',
  })
}
