<template>
  <v-row
    class="flex-column flex-nowrap"
    :class="{ isModal }"
    no-gutters
  >
    <v-row
      class="pa-1 pt-3 pb-3 pl-4"
      no-gutters
    >
      <v-col class="text-xs-semibold">
        <span>{{ t('labels.area') }}</span>
      </v-col>
      <v-col class="text-mono text-right text-xs-regular pr-4">
        <span>{{ measurement.Area }}</span>
      </v-col>
    </v-row>
    <v-row
      class="pa-1 pl-4 pb-3 pt-0"
      no-gutters
    >
      <v-col class="text-xs-semibold">
        <span>{{ t('labels.perimeter') }}</span>
      </v-col>
      <v-col class="text-mono text-right text-xs-regular pr-4">
        <span>{{ measurement.Perimeter }}</span>
      </v-col>
    </v-row>
    <v-row
      class="px-1 pb-1 pb-3 pl-4 pt-0"
      no-gutters
    >
      <v-col class="text-xs-semibold">
        <span>{{ t('labels.averageHu') }}</span>
      </v-col>
      <v-col class="text-mono text-right text-xs-regular pr-4">
        <span>{{ measurement.AverageHU }}</span>
      </v-col>
    </v-row>
    <v-row
      class="px-1 pt-0 pb-3 pl-4"
      no-gutters
    >
      <v-col class="text-xs-semibold">
        <span>{{ t('labels.lowestHu') }}</span>
      </v-col>
      <v-col class="text-mono text-right text-xs-regular pr-4">
        <span>{{ measurement.LowestHU }}</span>
      </v-col>
    </v-row>
    <v-row
      class="px-1 pb-5 pt-0 pl-4"
      no-gutters
    >
      <v-col class="text-xs-semibold">
        <span>{{ t('labels.highestHu') }}</span>
      </v-col>
      <v-col class="text-mono text-right text-xs-regular pr-4">
        <span>{{ measurement.HighestHU }}</span>
      </v-col>
    </v-row>
  </v-row>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import { DataOverlayPolygon } from '@3cr/viewer-types-ts';

interface Props {
  measurement: DataOverlayPolygon;
  isModal: boolean;
}

defineProps<Props>();

const { t } = useI18n();
</script>
