"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../src/modules/Reviews/reviews.module.css"),a=require("../../components/Typography/Typography.cjs.js"),c=require("../../components/RatingStars/RatingStars.cjs.js"),d=require("./components/ReviewList/ReviewList.cjs.js"),h=require("../../components/Pagination/Pagination.cjs.js"),m=({rating:s,reviews:l,page:r,pagesCount:t,isLoading:n,onPageChange:o})=>e.jsx("section",{className:i.root,children:e.jsxs("div",{className:i.container,children:[e.jsxs("div",{className:i.headerContainer,children:[e.jsx(a.Typography,{as:"h2",defaultVariant:"displaySm",mobileVariant:"headingXl",children:"Reviews"}),!!(s!=null&&s.stars)&&e.jsxs("div",{className:i.headerRow,children:[e.jsxs(a.Typography,{defaultVariant:"headingLg",mobileVariant:"headingSm",children:[s.stars,"/5"]}),e.jsx(c.RatingStars,{rating:s.stars,size:"lg"}),!!s.totalReviews&&e.jsxs(a.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,weight:"regular",children:[s.totalReviews," reviews"]})]})]}),e.jsxs("div",{className:i.reviewsContainer,children:[e.jsx(d.ReviewList,{reviews:l,page:r,pagesCount:t,isLoading:!!n,onPageChange:o}),e.jsx("div",{className:i.pagination,children:e.jsx(h.Pagination,{page:r,pagesCount:t,visiblePagesLimit:3,disabled:n,onPageChange:o})})]})]})});exports.Reviews=m;
