<template>
  <template v-if="orders.length">
    <div class="px-15 flex flex-col space-y-15 mt-20">
      <ProfileTravelOrdersItem
        v-for="item in orders"
        :key="item.id"
        :itemData="item"
        @onCancel="$emit('onCancel', item)"
      />
    </div>
  </template>
  <template v-if="!orders.length">
    <van-empty description="暂无旅游订单" />
  </template>
</template>

<script setup>
defineProps({
  orders: {
    type: Array,
    default: () => [],
  },
});
defineEmits(["onCancel"]);
</script>

<style lang="scss" scoped></style>
