
<template>
  <div class="able-chart" >
    <div class="title" >{{props.title}}</div>
    <div class="able" >
      <div class="able-item" v-for="item in 5" :key="item" >
        <img
          :src=" item > props.count ?  staticImg.ableGrey : staticImg.able" alt=""
        >
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
const staticImg = {
  ableGrey: require('@LP/assets/able-grey.png'),
  able: require('@LP/assets/able.png')
}

interface IProps {
  title: string,
  count: number | string
}

const props = defineProps<IProps>()

</script>

<style scoped lang="scss" >
.able-chart {
  width: 303px;
  height: 46px;
  background: #FDF8F5;
  border-radius: 10px;
  padding: 0 16px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .title {
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #FF8024;
  }
  .able {
    display: flex;
    display: flex;
    .able-item {
      margin-left: 5px;
      img {
        width: 20px;
        height: 20px;
        display: block;
      }
    }
  }
}
</style>
