import{r,h as s}from"./p-9add63ef.js";const t=":host{display:flex;gap:var(--star-gap, 2px);--sc-review-stars-primary:var(--sc-color-gray-500)}sc-icon.full-star::part(svg){fill:var(--sc-review-stars-primary);stroke:var(--sc-review-stars-primary);color:var(--sc-review-stars-primary)}sc-icon.half-star::part(svg){stroke:var(--sc-review-stars-primary);color:var(--sc-review-stars-primary)}sc-icon.empty-star::part(svg){color:var(--sc-review-stars-primary)}";const a=t;const c=class{constructor(s){r(this,s);this.rating=0;this.size=20}render(){const r=Math.floor(this.rating);const t=r<this.rating;const a=Array.from({length:5}).map(((a,c)=>{const e=c+1;const i=e<=r;const o=t&&e===r+1;return s("sc-icon",{name:o?"half-star":"star",class:{"full-star":i,"half-star":o,"empty-star":!i&&!o},style:{width:`${this.size}px`,height:`${this.size}px`}})}));return s("div",{part:"base"},a)}};c.style=a;export{c as sc_review_stars};
//# sourceMappingURL=p-b76220ee.entry.js.map