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

<template>
  <main>
    <FormOrganizationContactPoint :id="id" v-if="!fetchState.pending"></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";
import {BankAccount} from "~/models/Core/BankAccount";

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