"use client";
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { Img } from '@page-speed/img';
import { jsx, jsxs } from 'react/jsx-runtime';

// lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function AboutMinimalStory({
  title,
  content,
  author,
  authorSlot,
  featuredImage,
  className,
  containerClassName,
  contentClassName,
  titleClassName,
  bodyClassName,
  authorClassName,
  imageClassName,
  optixFlowConfig
}) {
  const renderAuthor = () => {
    if (authorSlot) return authorSlot;
    if (!author) return null;
    return /* @__PURE__ */ jsxs("div", { className: cn("mb-12 flex items-center gap-4", authorClassName), children: [
      author.avatar ? /* @__PURE__ */ jsx(
        Img,
        {
          src: author.avatar.src,
          alt: author.avatar.alt,
          className: "h-16 w-16 rounded-full object-cover",
          optixFlowConfig
        }
      ) : /* @__PURE__ */ jsx("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-primary text-2xl font-bold text-primary-foreground", children: author.name.charAt(0) }),
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("p", { className: "font-semibold", children: author.name }),
        /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: author.role })
      ] })
    ] });
  };
  return /* @__PURE__ */ jsx("section", { className: cn("py-32", className), children: /* @__PURE__ */ jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: cn("mx-auto max-w-3xl", contentClassName), children: [
    (authorSlot || author) && renderAuthor(),
    title && (typeof title === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-4xl font-bold tracking-tight md:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: titleClassName, children: title })),
    content && (typeof content === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mt-8 text-lg leading-relaxed text-muted-foreground whitespace-pre-line", bodyClassName), children: content }) : /* @__PURE__ */ jsx("div", { className: cn("mt-8", bodyClassName), children: content })),
    featuredImage && /* @__PURE__ */ jsx(
      Img,
      {
        src: featuredImage.src,
        alt: featuredImage.alt,
        className: cn("mt-12 w-full rounded-2xl object-cover", imageClassName),
        optixFlowConfig
      }
    )
  ] }) }) });
}

export { AboutMinimalStory };
