'use strict';

var framerMotion = require('framer-motion');
var jsxRuntime = require('react/jsx-runtime');

const AnimatedNumber = ({
  children,
  onClick,
  className
}) => {
  const reducedMotion = framerMotion.useReducedMotion();
  return /*#__PURE__*/jsxRuntime.jsx(framerMotion.motion.span, {
    className: className,
    "aria-hidden": true,
    initial: {
      zoom: 0.01
    },
    animate: {
      zoom: 1
    },
    exit: {
      zoom: 0.01
    },
    transition: {
      duration: reducedMotion ? 0 : 0.3,
      type: 'tween',
      ease: [0.3, 0, 0.1, 1]
    },
    onClick: () => onClick?.(),
    children: /*#__PURE__*/jsxRuntime.jsx(framerMotion.motion.span, {
      initial: {
        opacity: 0
      },
      animate: {
        opacity: [0, 0, 1]
      },
      exit: {
        opacity: [1, 0, 0]
      },
      transition: {
        duration: reducedMotion ? 0 : 0.3,
        times: [0, 0.5, 1]
      },
      children: children
    })
  });
};

exports.AnimatedNumber = AnimatedNumber;
//# sourceMappingURL=AnimatedNumber.js.map
