import{h}from"@stencil/core";export class ScReviewStars{constructor(){this.rating=0,this.size=20}render(){const e=Math.floor(this.rating),t=e<this.rating,r=Array.from({length:5}).map(((r,s)=>{const a=s+1,i=a<=e,n=t&&a===e+1;return h("sc-icon",{name:n?"half-star":"star",class:{"full-star":i,"half-star":n,"empty-star":!i&&!n},style:{width:`${this.size}px`,height:`${this.size}px`}})}));return h("div",{part:"base"},r)}static get is(){return"sc-review-stars"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-review-stars.scss"]}}static get styleUrls(){return{$:["sc-review-stars.css"]}}static get properties(){return{rating:{type:"number",mutable:!1,complexType:{original:"number",resolved:"number",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"rating",reflect:!1,defaultValue:"0"},size:{type:"number",mutable:!1,complexType:{original:"number",resolved:"number",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"size",reflect:!1,defaultValue:"20"}}}}