<!-- Page de détails d'un temps d'enseignement -->
<template>
  <main>
    <FormParametersEducationTiming :id="id" v-if="!fetchState.pending"></FormParametersEducationTiming>
  </main>
</template>

<script lang="ts">
import {defineComponent, useContext} from '@nuxtjs/composition-api'
import {useDataUtils} from "~/composables/data/useDataUtils";
import {EducationTiming} from "~/models/Education/EducationTiming";

export default defineComponent({
  name: 'EditFormParametersEducationTiming',
  setup () {
    const {$dataProvider, route} = useContext()
    const {getItemToEdit} = useDataUtils($dataProvider)
    const id = parseInt(route.value.params.id)
    const {fetchState} = getItemToEdit(id, EducationTiming)
    return {
      id,
      fetchState
    }
  }
})
</script>
