<script setup lang="ts">
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'

import EarlyMedicalAssesmentList from './list.vue'
import EarlyMedicalAssesmentForm from './form.vue'

const { mode, openForm, backToList } = useQueryMode('mode')
</script>

<template>
  <div>
    <EarlyMedicalAssesmentList v-if="mode === 'list'" @add="openForm" />
    <EarlyMedicalAssesmentForm v-else @back="backToList" />
  </div>
</template>
