<template>
  <div class="Summary18">
    <div class="Summary18-item" v-for="(item, index) in data" :class="'Summary18-item__' + theme" :key="index" v-if="index < 4">
      <h2>{{ item[keys] }}</h2>
      <p>{{ item[value] }}</p>
    </div>
  </div>
</template>

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

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

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

      value: {
        type: String,
        default: 'value'
      },

      theme: {
        type: String,
        default: '0'
      }
    },

    data () {
      return {
      }
    },

    methods: {
    }
  }
</script>

<style lang="scss" scoped>
  .Summary18 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;

    div {
      box-sizing: border-box;
    }

    .Summary18-item {
      display: flex;
      position: relative;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      width: 172px;
      height: 160px;
      text-align: center;
      color: #fff;
      font-size: 14px;
      background: url(../asset/Summary18.png) no-repeat center;
      background-size: 100% 100%;
      background-position: bottom;

      &.Summary18-item__1 {
        background: url(../asset/Summary18-dj.png) no-repeat center;
        background-size: 100% 100%;
        background-position: bottom;

        h2 {
          background: linear-gradient(to bottom, #FFF3D5, #ED9B08);
          -webkit-background-clip: text;
          color: transparent;
        }

        p {
          background: linear-gradient(to bottom, #FFF3D5, #ED9B08);
          -webkit-background-clip: text;
          color: transparent;
        }
      }

      h2 {
        margin-bottom: 20px;
        font-size: 18px;
        background: linear-gradient(to bottom, #ffff, #EBF9FF, #35BEFF);
        -webkit-background-clip: text;
        color: transparent;
        font-weight: normal;
        font-size: 24px;
      }

      p {
        font-weight: 700;
        font-size: 42px;
        background: linear-gradient(to bottom, #ffff, #EBF9FF, #35BEFF);
        -webkit-background-clip: text;
        color: transparent;
      }
    }
  }
</style>
