"use client";
import { jsx as r } from "react/jsx-runtime";
import H from "../../../components/shared/custom-dot.js";
import N from "../../../components/shared/custom-left-arrow.js";
import O from "../../../components/shared/custom-right-arrow.js";
import b from "../../../../../../_virtual/index16.js";
import x from "./testimonial-card.js";
import { SliderPresets as j } from "../../slider/types/index.js";
import { useAppSelector as L } from "../../../hooks/use-app-selector.js";
import { getCurrentBreakpoint as R } from "../../../../../../store/selectors.js";
const Q = ({ settings: o, meta: p }) => {
  var a, d, l, m, i, t, u, s, c, f, k, w, n, S, h, y, A, C, v, P;
  const T = L(R), B = ((a = o.columns) == null ? void 0 : a[T]) ?? ((d = o.columns) == null ? void 0 : d.tablet) ?? ((l = o.columns) == null ? void 0 : l.desktop) ?? 1;
  if (((m = o.layout) == null ? void 0 : m.desktop) === "grid")
    return /* @__PURE__ */ r("div", { className: "testimonial", children: o.testimonials.map((e, D) => /* @__PURE__ */ r(x, { data: e, settings: o, meta: p }, D)) });
  if (((i = o.layout) == null ? void 0 : i.desktop) === "slider")
    return /* @__PURE__ */ r(
      b,
      {
        arrows: (u = (t = o.slider) == null ? void 0 : t.showArrows) == null ? void 0 : u.desktop,
        dots: (c = (s = o.slider) == null ? void 0 : s.showDots) == null ? void 0 : c.desktop,
        infinite: (k = (f = o.slider) == null ? void 0 : f.infinite) == null ? void 0 : k.desktop,
        slidesToShow: B,
        rows: ((w = o.rows) == null ? void 0 : w.desktop) || 1,
        pauseOnHover: (S = (n = o.slider) == null ? void 0 : n.pauseOnHover) == null ? void 0 : S.desktop,
        autoplay: (y = (h = o.slider) == null ? void 0 : h.autoPlay) == null ? void 0 : y.desktop,
        autoplaySpeed: ((C = (A = o == null ? void 0 : o.slider) == null ? void 0 : A.autoplaySpeed) == null ? void 0 : C.desktop) || 3e3,
        nextArrow: /* @__PURE__ */ r(O, {}),
        prevArrow: /* @__PURE__ */ r(N, {}),
        customPaging: () => /* @__PURE__ */ r(H, {}),
        className: ((P = (v = o.slider) == null ? void 0 : v.preset) == null ? void 0 : P.desktop) || j.Preset1,
        children: o.testimonials.map((e) => /* @__PURE__ */ r(x, { data: e, settings: o, meta: p }, e.id))
      }
    );
};
export {
  Q as default
};
//# sourceMappingURL=testimonial.block.js.map
