"use client";
'use strict';

var React = require('react');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var jsxRuntime = require('react/jsx-runtime');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
__name(cn, "cn");
var Ticker = React__namespace.forwardRef(
  ({
    className,
    children,
    speed = 50,
    direction = "left",
    pauseOnHover = true,
    ...props
  }, ref) => {
    return /* @__PURE__ */ jsxRuntime.jsx(
      "div",
      {
        ref,
        className: cn("group relative overflow-hidden", className),
        ...props,
        children: /* @__PURE__ */ jsxRuntime.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";

exports.Ticker = Ticker;
