"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("../../../../src/modules/Testimonial/components/TextCard/textCard.module.css"),e=require("../../../../components/RatingStars/RatingStars.cjs.js"),r=require("../../../../components/Typography/Typography.cjs.js"),u=require("../Product/Product.cjs.js"),h=({background:i,review:a,product:s})=>{var l,o;return t.jsxs("div",{className:n.root,style:{backgroundImage:`url(${i.url})`},children:[t.jsx("div",{children:!!a.stars&&t.jsx(e.RatingStars,{rating:a.stars,size:"lg"})}),t.jsxs("div",{className:n.reviewContainer,children:[(a==null?void 0:a.title)&&t.jsx(r.Typography,{as:"h3",defaultVariant:"headingSm",mobileVariant:"headingXs",weight:"regular",children:a.title}),(a==null?void 0:a.description)&&t.jsx(r.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",weight:"regular",children:a.description}),((l=a==null?void 0:a.author)==null?void 0:l.name)&&t.jsx(r.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",weight:"regular",emphasis:!0,className:n.reviewAuthor,children:a.author.name})]}),t.jsxs("div",{className:n.infoContainer,children:[((o=a==null?void 0:a.author)==null?void 0:o.username)&&t.jsx(r.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"regular",children:a.author.username}),s&&t.jsx(u.Product,{image:s.image,name:s.name,link:s.link})]})]})};exports.TextCard=h;
