import { jsx as r, jsxs as o } from "react/jsx-runtime";
import { bp as w } from "./use-page-data.BYLN5MSa.js";
import { a } from "./twind.Cg2g8xBZ.js";
import { b as g } from "./use-section-style.CqWLdjop.js";
import { a as v } from "./iconify.tQTbL8nt.js";
import { B as N } from "./BrickRoot.CQgjTuOI.js";
import { u as k } from "./use-brick-props.C-zGB4NN.js";
import { useState as I } from "react";
function O(s) {
  const { brick: t, editable: c } = s, l = k(s), { colorPreset: i, border: n, shadow: m, ...f } = g(t), d = Object.values(f), [p, x] = I(!0), u = l.testimonials ?? [], h = (e) => {
    x(!1);
  };
  return /* @__PURE__ */ r(
    N,
    {
      brick: t,
      editable: c,
      manifest: w,
      className: a("flex gap-6 @mobile:flex-col @desktop:flex-row", d),
      children: u.map((e, b) => /* @__PURE__ */ o(
        "div",
        {
          className: a(
            "flex flex-1 flex-col gap-6 p-6 rounded-lg @desktop:(min-w-[250px])",
            i,
            n,
            m
          ),
          children: [
            /* @__PURE__ */ r(
              "blockquote",
              {
                className: a(
                  "flex-1 whitespace-pre-wrap text-pretty font-normal italic relative leading-relaxed"
                ),
                children: e.text
              }
            ),
            /* @__PURE__ */ o("div", { className: "flex items-center gap-3 flex-nowrap", children: [
              p && e.avatar?.src && /* @__PURE__ */ r(
                "img",
                {
                  src: e.avatar.src,
                  alt: e.avatar.alt || e.author,
                  className: "w-12 h-12 rounded-full object-cover",
                  onError: h
                }
              ),
              /* @__PURE__ */ o("div", { className: "flex-1 flex-nowrap leading-tight", children: [
                /* @__PURE__ */ r("cite", { className: a("font-semibold text-[90%] text-nowrap"), children: e.author }),
                e.subtitle && /* @__PURE__ */ r("div", { className: a("text-[85%]"), children: e.subtitle })
              ] }),
              e.socialIcon && /* @__PURE__ */ r(v, { icon: e.socialIcon, className: "h-5 w-5" })
            ] })
          ]
        },
        b
      ))
    }
  );
}
export {
  O as default
};
