import React from "react";

interface AnimatedTitleProps {
  position: "left" | "center" | "right";
  animationClass: string;
  children: React.ReactNode;
}

const AnimatedTitle: React.FC<AnimatedTitleProps> = ({
  position,
  animationClass,
  children,
}) => {
  const positionClass =
    position === "left"
      ? "md:text-left"
      : position === "center"
      ? "text-right md:text-center"
      : "text-center md:text-right";

  return (
    <div className={positionClass}>
      <h1
        className={`text-[40px] lg:text-[64px] xl:text-[76px] 2xl:text-[96px] font-times-sans ${animationClass}`}
        style={{ transform: "scaleY(1.1)" }}
      >
        {children}
      </h1>
    </div>
  );
};

export default AnimatedTitle;
