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

// src/lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function AppFeed({
  groups,
  eyebrow,
  title,
  description,
  className
}) {
  const hasHeading = Boolean(eyebrow || title || description);
  return /* @__PURE__ */ jsxs("section", { className: cn("flex flex-col gap-6", className), children: [
    hasHeading ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
      eyebrow ? /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: eyebrow }) : null,
      title ? /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: title }) : null,
      description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
    ] }) : null,
    /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-8", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
      /* @__PURE__ */ jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: group.date }),
      /* @__PURE__ */ jsx("ol", { className: "relative ml-2 flex flex-col gap-5 border-l border-border pl-6", children: group.events.map((event, eventIndex) => /* @__PURE__ */ jsxs("li", { className: "relative flex flex-col gap-1", children: [
        /* @__PURE__ */ jsx(
          "span",
          {
            className: "absolute -left-[27px] top-1 flex size-4 items-center justify-center rounded-full border border-border bg-card text-card-foreground [&_svg]:size-3",
            "aria-hidden": "true",
            children: event.icon
          }
        ),
        /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2 text-sm text-foreground", children: [
          event.actor ? /* @__PURE__ */ jsx("span", { className: "font-medium", children: event.actor }) : null,
          /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: event.message }),
          event.time ? /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: event.time }) : null
        ] }),
        event.details ? /* @__PURE__ */ jsx("div", { className: "mt-1 rounded-md border border-border bg-card p-3 text-sm text-card-foreground", children: event.details }) : null
      ] }, eventIndex)) })
    ] }, groupIndex)) })
  ] });
}

export { AppFeed };
//# sourceMappingURL=app-feed.js.map
//# sourceMappingURL=app-feed.js.map