<!-- Page de détails d'une zone de résidence -->
<template>
  <main>
    <v-skeleton-loader
      v-if="loading"
      type="text"
    />
    <FormParametersEducationTiming :id="item.id" v-else></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: 'NewFormParametersEducationTiming',
  setup () {
    const {$dataProvider, store} = useContext()
    const {createItem} = useDataUtils($dataProvider)
    const {create, loading, item} = createItem(store, EducationTiming)

    if(process.client){
      const itemToCreate: EducationTiming = new EducationTiming()
      create(itemToCreate)
    }

    return {
      loading,
      item
    }
  }
})
</script>
