import { jsxs as r, jsx as t } from "react/jsx-runtime";
import n from "../../../../modules/Testimonial/components/TextCard/textCard.module.css";
import { RatingStars as d } from "../../../../components/RatingStars/RatingStars.es.js";
import { Typography as s } from "../../../../components/Typography/Typography.es.js";
import { Product as h } from "../Product/Product.es.js";
const b = ({ background: o, review: a, product: l }) => {
  var m, i;
  return /* @__PURE__ */ r("div", { className: n.root, style: { backgroundImage: `url(${o.url})` }, children: [
    /* @__PURE__ */ t("div", { children: !!a.stars && /* @__PURE__ */ t(d, { rating: a.stars, size: "lg" }) }),
    /* @__PURE__ */ r("div", { className: n.reviewContainer, children: [
      (a == null ? void 0 : a.title) && /* @__PURE__ */ t(s, { as: "h3", defaultVariant: "headingSm", mobileVariant: "headingXs", weight: "regular", children: a.title }),
      (a == null ? void 0 : a.description) && /* @__PURE__ */ t(s, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", weight: "regular", children: a.description }),
      ((m = a == null ? void 0 : a.author) == null ? void 0 : m.name) && /* @__PURE__ */ t(
        s,
        {
          as: "p",
          defaultVariant: "labelSm",
          mobileVariant: "labelXs",
          weight: "regular",
          emphasis: !0,
          className: n.reviewAuthor,
          children: a.author.name
        }
      )
    ] }),
    /* @__PURE__ */ r("div", { className: n.infoContainer, children: [
      ((i = a == null ? void 0 : a.author) == null ? void 0 : i.username) && /* @__PURE__ */ t(s, { as: "p", defaultVariant: "labelSm", mobileVariant: "labelXs", emphasis: !0, weight: "regular", children: a.author.username }),
      l && /* @__PURE__ */ t(h, { image: l.image, name: l.name, link: l.link })
    ] })
  ] });
};
export {
  b as TextCard
};
