import { j as r } from "../../../../../_virtual/jsx-runtime.js";
import { a as j } from "../../../../sdk/dist/shared/chunk-FKNNTHWX.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-UU2MSQXY.js";
import "../../../../sdk/dist/shared/chunk-T3LIA4YB.js";
import "../../../../sdk/dist/shared/chunk-YBGPPF7T.js";
import "../../../../sdk/dist/shared/chunk-UMHXXXVP.js";
import "../../../../sdk/dist/shared/chunk-5N6MBJJ4.js";
import { tx as o } from "../../../../style-system/dist/twind.js";
import { useBrickStyle as w } from "../hooks/use-brick-style.js";
import { InlineIcon as g } from "../../../../../node_modules/.pnpm/@iconify_react@6.0.0_react@18.3.0-canary-3d9b20132-20240124/node_modules/@iconify/react/dist/iconify.js";
import v from "../components/BrickRoot.js";
import { useBrickProps as b } from "../hooks/use-brick-props.js";
import { useState as N } from "react";
function z(s) {
  const { brick: a, editable: t } = s, c = b(s), { colorPreset: l, border: i, shadow: m, ...n } = w(a), p = Object.values(n), [x, f] = N(!0), d = c.testimonials ?? [], h = (e) => {
    f(!1);
  };
  return /* @__PURE__ */ r.jsx(
    v,
    {
      brick: a,
      editable: t,
      manifest: j,
      className: o("flex gap-6 @mobile:flex-col @desktop:flex-row", p),
      children: d.map((e, u) => /* @__PURE__ */ r.jsxs(
        "div",
        {
          className: o(
            "flex flex-1 flex-col gap-6 p-6 rounded-lg @desktop:(min-w-[250px])",
            l,
            i,
            m
          ),
          children: [
            /* @__PURE__ */ r.jsx(
              "blockquote",
              {
                className: o(
                  "flex-1 whitespace-pre-wrap text-pretty font-normal italic relative leading-relaxed"
                ),
                children: e.text
              }
            ),
            /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3 flex-nowrap", children: [
              x && e.avatar?.src && /* @__PURE__ */ r.jsx(
                "img",
                {
                  src: e.avatar.src,
                  alt: e.avatar.alt || e.author,
                  className: "w-12 h-12 rounded-full object-cover",
                  onError: h
                }
              ),
              /* @__PURE__ */ r.jsxs("div", { className: "flex-1 flex-nowrap leading-tight", children: [
                /* @__PURE__ */ r.jsx("cite", { className: o("font-semibold text-[90%] text-nowrap"), children: e.author }),
                e.company && /* @__PURE__ */ r.jsx("div", { className: o("text-[85%]"), children: e.company })
              ] }),
              e.socialIcon && /* @__PURE__ */ r.jsx(g, { icon: e.socialIcon, className: "h-5 w-5" })
            ] })
          ]
        },
        u
      ))
    }
  );
}
export {
  z as default
};
//# sourceMappingURL=testimonials.js.map
