import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx, jsxs } from 'react/jsx-runtime';

// src/lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
var COLUMN_CLASS = {
  three: "sm:grid-cols-3",
  four: "sm:grid-cols-2 lg:grid-cols-4"
};
function CommerceIncentives({
  incentives,
  eyebrow,
  title,
  description,
  columns = "three",
  className
}) {
  const hasHeading = Boolean(eyebrow || title || description);
  return /* @__PURE__ */ jsx("section", { className: cn("bg-background py-16 sm:py-20", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl px-6 lg:px-8", children: [
    hasHeading ? /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-2xl flex-col items-center gap-3 text-center", children: [
      eyebrow ? /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold uppercase tracking-wide text-primary", children: eyebrow }) : null,
      title ? /* @__PURE__ */ jsx("h2", { className: "text-balance text-2xl font-semibold tracking-tight text-foreground sm:text-3xl", children: title }) : null,
      description ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-base text-muted-foreground", children: description }) : null
    ] }) : null,
    /* @__PURE__ */ jsx(
      "div",
      {
        className: cn(
          "grid grid-cols-1 gap-8",
          COLUMN_CLASS[columns],
          hasHeading && "mt-12"
        ),
        children: incentives.map((incentive, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-2", children: [
          incentive.icon ? /* @__PURE__ */ jsx("div", { className: "flex size-10 items-center justify-center rounded-lg bg-primary text-primary-foreground [&_svg]:size-5", children: incentive.icon }) : null,
          /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: incentive.title }),
          incentive.description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: incentive.description }) : null
        ] }, index))
      }
    )
  ] }) });
}

export { CommerceIncentives };
//# sourceMappingURL=commerce-incentives.js.map
//# sourceMappingURL=commerce-incentives.js.map