import { ElDatePicker } from 'element-plus/es/components/date-picker/index.mjs'
import { ElInput } from 'element-plus/es/components/input/index.mjs'

import EnterpriseSelect from '../../components/shared/EnterpriseSelect.vue'
import ConfirmDialog from '../../components/shared/ConfirmDialog.vue'
import TravelRequestApprovalDialog from '../../components/travel/TravelRequestApprovalDialog.vue'
import TravelRequestApplicationFacts from '../../components/travel/TravelRequestApplicationFacts.vue'
import TravelRequestBudgetAnalysis from '../../components/travel/TravelRequestBudgetAnalysis.vue'
import TravelRequestDeleteDialog from '../../components/travel/TravelRequestDeleteDialog.vue'
import TravelRequestDetailHero from '../../components/travel/TravelRequestDetailHero.vue'
import TravelRequestProgressCard from '../../components/travel/TravelRequestProgressCard.vue'
import TravelRequestRelatedApplicationCard from '../../components/travel/TravelRequestRelatedApplicationCard.vue'
import StageRiskAdviceCard from '../../components/travel/StageRiskAdviceCard.vue'
import TravelRequestReturnDialog from '../../components/travel/TravelRequestReturnDialog.vue'
import { useTravelRequestDetailSetup } from './travelRequestDetailSetup.js'

export default {
  name: 'TravelRequestDetailView',
  components: {
    ConfirmDialog,
    ElDatePicker,
    ElInput,
    EnterpriseSelect,
    StageRiskAdviceCard,
    TravelRequestApprovalDialog,
    TravelRequestApplicationFacts,
    TravelRequestBudgetAnalysis,
    TravelRequestDeleteDialog,
    TravelRequestDetailHero,
    TravelRequestProgressCard,
    TravelRequestRelatedApplicationCard,
    TravelRequestReturnDialog
  },
  props: {
    request: {
      type: Object,
      default: () => ({})
    },
    backLabel: {
      type: String,
      default: '返回报销列表'
    },
    approvalMode: {
      type: Boolean,
      default: false
    }
  },
  emits: ['backToRequests', 'openAssistant', 'request-updated', 'request-deleted'],
  setup: useTravelRequestDetailSetup
}
