<template>
  <div class="safety-platform-container">
    <header class="safety-platform-container__header">
      <BreadcrumbBack />
      <span class="breadcrumb-title">{{ headerTitle }}</span>
    </header>
    <EmployeeReportHiddenTroubleManagementDetail />
  </div>
</template>

<script setup lang="ts">
  import { computed } from 'vue';
  import { useRoute } from 'vue-router';
  import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
  import EmployeeReportHiddenTroubleManagementDetail from './components/employeeReportHiddenTroubleManagementDetail.vue';

  const route = useRoute();
  const operate = route.query.operate as string;

  const headerTitle = computed(() => {
    switch (operate) {
      case 'employee-report-hidden-trouble-create':
        return '新增员工上报隐患';
      case 'employee-report-hidden-trouble-edit':
        return '编辑员工上报隐患';
      case 'employee-report-hidden-trouble-view':
        return '查看员工上报隐患';
      case 'employee-report-hidden-trouble-approve':
        return '审核员工上报隐患';
      default:
        return '查看员工上报隐患';
    }
  });
</script>

<style scoped lang="scss">
  @use '@/styles/page-details-layout.scss' as *;
  @use '@/styles/page-main-layout.scss' as *;

  .safety-platform-container__header {
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }
</style>
