/**
 * 订单状态映射
 */
export const OrderStatusMap = {
  waiting_for_payment: {
    text: '待支付',
    class: 'status-waiting'
  },
  payment_in_progress: {
    text: '支付中',
    class: 'status-progress'
  },
  payment_successful: {
    text: '支付成功',
    class: 'status-success'
  },
  in_used: {
    text: '使用中',
    class: 'status-using'
  },
  payment_failed: {
    text: '支付失败',
    class: 'status-failed'
  },
  order_cancelled: {
    text: '已取消',
    class: 'status-cancelled'
  },
  used_done: {
    text: '已完成',
    class: 'status-finished'
  },
  fail: {
    text: '已取消',
    class: 'status-cancelled'
  }
}

/**
 * 订单状态分类
 */
export const OrderStatusTabs = [
  {
    text: '全部',
    status: []
  },
  {
    text: '待支付',
    status: ['waiting_for_payment', 'payment_in_progress']
  },
  {
    text: '使用中',
    status: ['payment_successful', 'in_used']
  },
  {
    text: '已完成',
    status: ['used_done', 'payment_failed', 'order_cancelled']
  }
]