"use client";
import { useMemo as l } from "react";
const v = ({ productDisplays: e }) => {
  var s;
  const a = e.length > 1, r = e[0], b = r.title, u = (s = r.description) != null ? s : "", n = l(() => e.map((t) => ({
    value: t.title.replace(" ", "_").toLocaleLowerCase(),
    label: t.title
  })), [e]), d = l(() => n.reduce((t, i) => {
    const o = e.find((f) => f.title === i.label), c = o == null ? void 0 : o.productCards;
    return c && (t[i.value] = c), t;
  }, {}), [n, e]);
  return {
    isTabbed: a,
    title: b,
    description: u,
    tabs: n,
    slidesByTabs: d
  };
};
export {
  v as useProductsData
};
