import { jsx as a } from "react/jsx-runtime";
import { cn as c } from "../../utils/cn/cn.es.js";
import s from "../../components/RatingStars/ratingStars.module.css";
import { Icon as l } from "../Icon/Icon.es.js";
import { EIconName as e } from "../Icon/constants.es.js";
const f = (r, t) => {
  const o = t < Math.floor(r), m = !o && t < r;
  return o ? e.STAR_FILL : m ? e.STAR_HALF : e.STAR_OUTLINE;
}, u = ({ rating: r, className: t, size: o }) => /* @__PURE__ */ a("div", { className: c(s.stars, t), "data-size": o, children: Array.from({ length: 5 }).map((m, n) => /* @__PURE__ */ a("div", { className: s.starContainer, children: /* @__PURE__ */ a(l, { name: f(r, n), className: s.starIcon }) }, n)) });
export {
  u as RatingStars
};
