"use client";
'use strict';

var React = require('react');
var framerMotion = require('framer-motion');
var utils = require('@hanzo/ui/lib/utils');
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 AppleHelloEffect = React__namespace.forwardRef(({ className, text = "Hello", duration = 2, ...props }, ref) => {
  const letters = text.split("");
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      ref,
      className: utils.cn(
        "relative flex items-center justify-center text-6xl font-bold",
        className
      ),
      ...props,
      children: letters.map((letter, index) => /* @__PURE__ */ jsxRuntime.jsx(
        framerMotion.motion.span,
        {
          initial: { opacity: 0, y: 50 },
          animate: { opacity: 1, y: 0 },
          transition: {
            duration,
            delay: index * 0.1,
            ease: [0.215, 0.61, 0.355, 1]
          },
          className: "inline-block",
          children: letter
        },
        index
      ))
    }
  );
});
AppleHelloEffect.displayName = "AppleHelloEffect";

exports.AppleHelloEffect = AppleHelloEffect;
