<!-- Page de détails d'une adresse postale -->
<template>
  <main>
    <v-skeleton-loader
      v-if="fetchState.pending"
      type="text"
    />
    <FormOrganizationAddress :id="id" v-else></FormOrganizationAddress>
  </main>
</template>

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

export default defineComponent({
  name: 'EditOrganizationAddressEdit',
  setup () {
    const {$dataProvider, route} = useContext()
    const {getItemToEdit} = useDataUtils($dataProvider)
    const {id, fetchState} = getItemToEdit(route, OrganizationAddressPostal)
    return {
      id,
      fetchState
    }
  }
})
</script>
