"use client";
import * as React from 'react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx } from 'react/jsx-runtime';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
__name(cn, "cn");
var Marquee = React.forwardRef(
  ({
    className,
    children,
    repeat = 2,
    reverse = false,
    pauseOnHover = false,
    vertical = false,
    ...props
  }, ref) => {
    return /* @__PURE__ */ jsx(
      "div",
      {
        ref,
        className: cn(
          "group flex overflow-hidden",
          vertical ? "flex-col" : "flex-row",
          className
        ),
        ...props,
        children: Array.from({ length: repeat }).map((_, i) => /* @__PURE__ */ jsx(
          "div",
          {
            className: cn(
              "flex shrink-0",
              vertical ? "animate-marquee-vertical flex-col" : "animate-marquee",
              reverse && (vertical ? "[animation-direction:reverse]" : "[animation-direction:reverse]"),
              pauseOnHover && "group-hover:[animation-play-state:paused]"
            ),
            children
          },
          i
        ))
      }
    );
  }
);
Marquee.displayName = "Marquee";

export { Marquee };
