"use client";
import * as React from 'react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx, jsxs } 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 Ticker = React.forwardRef(
  ({
    className,
    children,
    speed = 50,
    direction = "left",
    pauseOnHover = true,
    ...props
  }, ref) => {
    return /* @__PURE__ */ jsx(
      "div",
      {
        ref,
        className: cn("group relative overflow-hidden", className),
        ...props,
        children: /* @__PURE__ */ jsxs(
          "div",
          {
            className: cn(
              "flex w-fit animate-scroll",
              pauseOnHover && "group-hover:[animation-play-state:paused]"
            ),
            style: {
              animationDuration: `${speed}s`,
              animationDirection: direction === "right" ? "reverse" : "normal"
            },
            children: [
              children,
              children
            ]
          }
        )
      }
    );
  }
);
Ticker.displayName = "Ticker";

export { Ticker };
