<template>
  <v-row class="px-4">
    <v-col cols="12" md="8">
      <div class="text-h6 text-secondary-lighten-2 font-weight-bold">{{ label }}</div>
    </v-col>
    <v-col class="d-flex flex-column align-md-end justify-center" cols="12" md="4">
      <div class="text-h4 text-md-h6 text-center text-primary font-weight-bold">{{ value.value.toFixed(fixed ?? 2) }} {{ $t(`units.${value.unit}`) }}</div>
    </v-col>
  </v-row>
</template>

<script setup lang="ts">
  import type { Param } from '@/types/param'

  defineProps<{
    label: string
    value: Param
    fixed?: number
  }>()
</script>
