<template>
  <div
    class="border-box font-size-24 color-171717 line-height-32 font-500 pt-12 pb-12"
  >
    {{ currentStatusspan }}
  </div>
</template>

<script setup>
import { defineProps, computed } from "vue";

// 订单状态配置映射
const ORDER_STATUS_CONFIG = {
  0: "待支付",
  1: "待确认",
  2: "待使用",
  3: "已取消",
  4: "退款中",
  5: "已退款",
  6: "已完成",
};

const props = defineProps({
  orderData: {
    type: Object,
    required: true,
    default: () => ({
      orderId: "",
      paySerialNumber: "",
      payWay: "", // 支付方式 0-微信 1-支付宝 2-云闪付
      payAmt: "",
      orderStatus: "0", // 订单状态 0-待支付 1-待确认 2-待使用 3-已取消 4-退款中 5-已退款 6-已完成
      orderType: "0", // 0-酒店订单, 1-门票订单, 2-餐饮
    }),
  },
});

// 当前状态
const currentStatusspan = computed(() => {
  return (
    ORDER_STATUS_CONFIG[props.orderData.orderStatus] || ORDER_STATUS_CONFIG["0"]
  );
});
</script>

<style scoped lang="scss">
@import "./styles/index.scss";
</style>
