<i18n>
{
  "en": {
    "FormModel": {
      "noResult": "No result"
    }
  },
  "ru": {
    "FormModel": {
      "noResult": "Модель заявления не найдена"
    }
  }
}
</i18n>

<template>
  <div v-if="common.active === 'form_model'" class="q-pb-md">
    <q-card class="no-shadow q-gutter-y-md q-mx-md no-border-radius">
      <div
        class="q-gutter-y-md bg-white q-px-lg q-pb-md q-pt-sm q-mt-md q-mx-md rounded-borders"
      >
        <div v-if="formModel">
          <v-json-editor v-model="formModel" :options="{ mode: 'view' }" />
        </div>
        <div v-else class="full-width text-center">
          {{ $t('FormModel.noResult') }}
        </div>
      </div>
    </q-card>
  </div>
</template>

<script lang="ts">
// @ts-nocheck
// @ts-ignore
import VJsonEditor from 'v-jsoneditor';
export default {
  name: 'FormModel',
  components: {
    VJsonEditor,
  },
  props: ['common', 'model'],
  data() {
    return {};
  },
  computed: {
    formModel() {
      const card = this.$store.getters['registryService/services/servicesCard'];
      return card.model || null;
    },
  },
};
</script>
