<script setup lang="ts">
import { computed } from "vue";
import BasicDescriptions from "/@/components/BasicDescriptions";
import { orderRecordColumns } from "/@/utils/details/_purchase";

const props = defineProps<{
  data: Record<string, string>;
  isPurchPay?: boolean;
}>();

const payHiddenColumns = [
  "inv_status",
  "remark",
  "ainv_fee",
  "inv_fee",
  "winv_fee",
  "inv_tag_fee"
];

const columns = computed(() => {
  if (!props.isPurchPay) return orderRecordColumns;

  return orderRecordColumns.filter(
    col => !payHiddenColumns.includes(col.field)
  );
});
</script>

<template>
  <BasicDescriptions :data="data" :columns="columns" />
</template>
