<!-- Page de détails d'un point de contact (Edit mode) -->

<template>
  <main>
    <v-skeleton-loader
      v-if="fetchState.pending"
      type="text"
    />
    <FormOrganizationContactPoint :id="id" v-else></FormOrganizationContactPoint>
  </main>
</template>

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

export default defineComponent({
  name: 'EditContactPoint',
  setup () {
    const {$dataProvider, route} = useContext()
    const {getItemToEdit} = useDataUtils($dataProvider)
    const {id, fetchState} = getItemToEdit(route, ContactPoint)

    return {
      id,
      fetchState
    }
  }
})
</script>
<style>
</style>
