"use client"; import React, { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { cn } from "@/lib/utils"; interface RotatingTextProps { words: string[]; className?: string; interval?: number; // Intervalo em milissegundos para a rotação } export function RotatingText({ words, className, interval = 3000, }: RotatingTextProps) { const [currentIndex, setCurrentIndex] = useState(0); useEffect(() => { const timer = setInterval(() => { setCurrentIndex((prevIndex) => (prevIndex + 1) % words.length); }, interval); return () => clearInterval(timer); }, [words, interval]); return (