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

<template>
  <main>
    <FormOrganizationBankAccount :id="id" v-if="!fetchState.pending"></FormOrganizationBankAccount>
  </main>
</template>

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

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