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

// src/lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
var COLUMN_CLASS = {
  two: "sm:grid-cols-2",
  three: "sm:grid-cols-2 lg:grid-cols-3"
};
function ContentCardBody({ post }) {
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    post.image ? /* @__PURE__ */ jsx("div", { className: "aspect-[16/10] overflow-hidden rounded-xl bg-muted [&_img]:size-full [&_img]:object-cover [&_img]:transition-transform [&_img]:duration-200 [&_img]:ease-out group-hover:[&_img]:scale-105", children: post.image }) : null,
    post.meta ? /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground", children: post.meta }) : null,
    /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-foreground group-hover:text-primary", children: post.title }),
    post.excerpt ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-sm text-muted-foreground", children: post.excerpt }) : null
  ] });
}
function MarketingContent({
  posts,
  eyebrow,
  title,
  description,
  columns = "three",
  className
}) {
  const hasHeading = Boolean(eyebrow || title || description);
  return /* @__PURE__ */ jsx("section", { className: cn("bg-background py-24 sm:py-32", 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-4 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-3xl font-semibold tracking-tight text-foreground sm:text-4xl", children: title }) : null,
      description ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-lg text-muted-foreground", children: description }) : null
    ] }) : null,
    /* @__PURE__ */ jsx(
      "div",
      {
        className: cn(
          "grid grid-cols-1 gap-x-8 gap-y-12",
          COLUMN_CLASS[columns],
          hasHeading && "mt-16"
        ),
        children: posts.map(
          (post, index) => post.href ? /* @__PURE__ */ jsx(
            "a",
            {
              href: post.href,
              className: "group flex flex-col gap-3 rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
              children: /* @__PURE__ */ jsx(ContentCardBody, { post })
            },
            index
          ) : /* @__PURE__ */ jsx("article", { className: "group flex flex-col gap-3", children: /* @__PURE__ */ jsx(ContentCardBody, { post }) }, index)
        )
      }
    )
  ] }) });
}

export { MarketingContent };
//# sourceMappingURL=marketing-content.js.map
//# sourceMappingURL=marketing-content.js.map