import { h as e } from "./chunk.BlbRoQQ3.js";
import { a8 as t } from "./use-page-data.Cb2SuuwJ.js";
import "./chunk-LSPN22SI.D75E3zS-.js";
import { c as n } from "./twind.BiM9xcCd.js";
import { b as r } from "./jsx-runtime.DF4K5VCp.js";
import "./chroma-js.Dcir27CH.js";
import "./color-system.Dp99zR0T.js";
import "./react.BZZIbN3T.js";
import "./schema-resolver.p7B_pu36.js";
import { c as i } from "./iconify.BzZOJCu5.js";
import { b as a } from "./use-brick-style.DDPl-_C1.js";
import "./use-brick-manifest.Iv9SG-7-.js";
import { b as o } from "./BrickRoot.DbISziyH.js";
import { b as s } from "./use-brick-props.Db5hMGVc.js";
import { useState as c } from "react";
var l = /* @__PURE__ */ e(r());
function u(e) {
	let { brick: r, editable: u } = e, d = s(e), { colorPreset: f, border: p, shadow: m,...h } = a(r), g = Object.values(h), [_, v] = c(!0), y = d.testimonials ?? [], b = (e) => {
		v(!1);
	};
	return /* @__PURE__ */ (0, l.jsx)(o, {
		brick: r,
		editable: u,
		manifest: t,
		className: n("flex gap-6 @mobile:flex-col @desktop:flex-row", g),
		children: y.map((e, t) => /* @__PURE__ */ (0, l.jsxs)("div", {
			className: n("flex flex-1 flex-col gap-6 p-6 rounded-lg @desktop:(min-w-[250px])", f, p, m),
			children: [/* @__PURE__ */ (0, l.jsx)("blockquote", {
				className: n("flex-1 whitespace-pre-wrap text-pretty font-normal italic relative leading-relaxed"),
				children: e.text
			}), /* @__PURE__ */ (0, l.jsxs)("div", {
				className: "flex items-center gap-3 flex-nowrap",
				children: [
					_ && e.avatar?.src && /* @__PURE__ */ (0, l.jsx)("img", {
						src: e.avatar.src,
						alt: e.avatar.alt || e.author,
						className: "w-12 h-12 rounded-full object-cover",
						onError: b
					}),
					/* @__PURE__ */ (0, l.jsxs)("div", {
						className: "flex-1 flex-nowrap leading-tight",
						children: [/* @__PURE__ */ (0, l.jsx)("cite", {
							className: n("font-semibold text-[90%] text-nowrap"),
							children: e.author
						}), e.company && /* @__PURE__ */ (0, l.jsx)("div", {
							className: n("text-[85%]"),
							children: e.company
						})]
					}),
					e.socialIcon && /* @__PURE__ */ (0, l.jsx)(i, {
						icon: e.socialIcon,
						className: "h-5 w-5"
					})
				]
			})]
		}, t))
	});
}
export { u as default };

//# sourceMappingURL=testimonials.CBMwtVXA.js.map