<script setup lang="ts">
import chargeList from '../../components/charge-orderList/charge-orderList.vue'
import xsbList from '../../components/xsb-orderList/xsb-orderList.vue'
import filmList from '../../components/film-orderList/film-orderList.vue'
import djkorder from '../../components/djk-order/index.vue'
import videoRightsList from '../../components/videoRights-orderList/videoRights-orderList.vue'
import Jy from '../../components/refueling-order/index.vue'

interface Props {
  orderList: Api.xsbOrderList
}

defineProps<Props>()

defineEmits<{
  refresh: []
}>()
</script>

<template>
  <block>
    <xsbList
      v-if="orderList.businessType === 'XSB' || orderList.businessType === 'all'" :order="orderList"
      @refresh="$emit('refresh')"
    />
    <chargeList v-else-if="orderList.businessType === 'CD' || orderList.businessType === 'all'" :order="orderList" />
    <filmList
      v-else-if="orderList.businessType === 'DYY' || orderList.businessType === 'all'" :order="orderList"
      @refresh="$emit('refresh')"
    />
    <djkorder
      v-else-if="orderList.businessType === 'DJK' || orderList.businessType === 'all'" :order="orderList"
      @refresh="$emit('refresh')"
    />
    <videoRightsList v-else-if="orderList.businessType === 'XNSP' || orderList.businessType === 'all'" :order="orderList" />
    <Jy v-else-if="orderList.businessType === 'JY' || orderList.businessType === 'all'" :order="orderList" />
  </block>
</template>
