<template>
  <div class="item-summary-star-rating pc" v-bind:rating="rating">
    <div
      class="item-summary-star-rating-fill pc"
      v-bind:style="{ width: ratingToPercent + '%' }"
    >
      <span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
    </div>
    <div class="item-summary-star-rating-base">
      <span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>
    </div>
  </div>
</template>

<script>
export default {
  naem: "starRatingForItemSummary",
  props: {
    rating: String,
  },
  computed: {
    ratingToPercent() {
      const score = +this.rating * 20; // 100%를 기준으로 하기 위해
      return score;
    },
  },
};
</script>

<style></style>
