"use client";
import { motion } from 'framer-motion';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx, jsxs } from 'react/jsx-runtime';
import * as SeparatorPrimitive from '@radix-ui/react-separator';

// components/blocks/timeline/timeline-horizontal-phases.tsx
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function Card({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    "div",
    {
      "data-slot": "card",
      className: cn(
        "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
        className
      ),
      ...props
    }
  );
}
function CardContent({ className, ...props }) {
  return /* @__PURE__ */ jsx(
    "div",
    {
      "data-slot": "card-content",
      className: cn("px-6", className),
      ...props
    }
  );
}
function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}) {
  return /* @__PURE__ */ jsx(
    SeparatorPrimitive.Root,
    {
      "data-slot": "separator",
      decorative,
      orientation,
      className: cn(
        "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
        className
      ),
      ...props
    }
  );
}
var defaultPhases = [
  {
    id: 0,
    date: "January 15, 2024",
    title: "Phase I",
    description: "Initial data collection and model architecture design for the AI system."
  },
  {
    id: 1,
    date: "March 30, 2024",
    title: "Phase II",
    description: "Model training and validation with core dataset implementation."
  },
  {
    id: 2,
    date: "June 15, 2024",
    title: "Phase III",
    description: "Integration of advanced features and performance optimization."
  },
  {
    id: 3,
    date: "September 1, 2024",
    title: "Phase IV",
    description: "Final testing, deployment, and continuous improvement system launch."
  }
];
function TimelineHorizontalPhases({
  className,
  heading = "Timeline",
  currentPhase = 2,
  phases = defaultPhases
}) {
  return /* @__PURE__ */ jsx("section", { className: cn("bg-background py-32", className), children: /* @__PURE__ */ jsxs("div", { className: "container flex flex-col items-center", children: [
    /* @__PURE__ */ jsx("h1", { className: "mb-10 text-center text-3xl font-bold tracking-tighter text-foreground sm:text-6xl", children: heading }),
    /* @__PURE__ */ jsx(Card, { className: "relative w-full border-none shadow-none md:py-16", children: /* @__PURE__ */ jsx(CardContent, { className: "p-0", children: /* @__PURE__ */ jsxs("div", { className: "relative flex flex-col items-center md:mt-12", children: [
      /* @__PURE__ */ jsx(Separator, { className: "absolute -top-8 left-0 hidden md:block" }),
      currentPhase !== void 0 && /* @__PURE__ */ jsx(
        motion.div,
        {
          initial: { width: 0 },
          whileInView: {
            width: `${currentPhase / phases.length * 104}%`
          },
          transition: { ease: "easeOut", duration: 0.5 },
          className: cn(
            "absolute -top-8 left-0 hidden h-0.5 bg-foreground md:block"
          )
        }
      ),
      /* @__PURE__ */ jsx("div", { className: "grid gap-6 md:grid-cols-4", children: phases.map((phase, index) => /* @__PURE__ */ jsxs("div", { className: "relative space-y-2", children: [
        /* @__PURE__ */ jsx(
          Separator,
          {
            orientation: "vertical",
            className: "absolute top-6 left-0 block md:hidden"
          }
        ),
        index === 0 && /* @__PURE__ */ jsx(
          motion.div,
          {
            initial: { height: 0 },
            whileInView: {
              height: currentPhase * 112
            },
            transition: { ease: "easeOut", duration: 0.5 },
            className: cn(
              "absolute left-0 z-10 w-0.5 bg-foreground md:hidden"
            )
          }
        ),
        /* @__PURE__ */ jsx("div", { className: "absolute top-0 -left-[9px] z-10 mb-5 flex size-5 items-center justify-center rounded-full bg-foreground p-1 md:-top-10 md:left-0", children: /* @__PURE__ */ jsx("div", { className: "size-full rounded-full bg-background" }) }),
        /* @__PURE__ */ jsxs("div", { className: "pl-7 md:pl-0", children: [
          /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: phase.date }),
          /* @__PURE__ */ jsx("h2", { className: "text-xl font-bold tracking-tighter text-foreground", children: phase.title }),
          /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: phase.description })
        ] })
      ] }, phase.id)) })
    ] }) }) })
  ] }) });
}

export { TimelineHorizontalPhases };
//# sourceMappingURL=timeline-horizontal-phases.js.map
//# sourceMappingURL=timeline-horizontal-phases.js.map