<template>
  <div class="summary19">
    <div class="summary19-item" v-for="(item, index) in data" :key="index" v-if="index < 4">
      <div style="color: white" v-text="item[keys]"/>
      <span v-text="item[value]"/>
      <p v-if="item.unit" v-text="item.unit"/>
    </div>
  </div>
</template>

<script>
export default {
  name: 'summary19',

  props: {
    data: {
      type: Array,
      default: () => []
    },

    keys: {
      type: String,
      default: 'key'
    },

    value: {
      type: String,
      default: 'value'
    }
  },
}
</script>

<style lang="scss" scoped>
$theme-color: #23ECFD;
.summary19 {
  height: 100%;
  padding: 18px 14px;
  background: hsla(0, 0%, 100%, .04);
  margin: -16px 16px auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  div {
    box-sizing: border-box;
  }

  .summary19-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 12px;

    span {
      font-family: D-DIN;
      font-size: 18px;
      color: $theme-color;
    }

    p {
      color: $theme-color;
    }

    &:nth-of-type(2n) {
      justify-self: flex-end;
    }
  }
}
</style>
