"use client"; import { memo, useState, useEffect } from "react"; import { cls } from "@/lib/utils"; type BarData = { defaultHeight: number; hoverHeight: number; }; interface BentoAnimatedBarChartProps { bars?: BarData[]; className?: string; barClassName?: string; } const defaultBars: BarData[] = [ { defaultHeight: 100, hoverHeight: 40 }, { defaultHeight: 84, hoverHeight: 100 }, { defaultHeight: 62, hoverHeight: 75 }, { defaultHeight: 90, hoverHeight: 50 }, { defaultHeight: 70, hoverHeight: 90 }, { defaultHeight: 50, hoverHeight: 60 }, { defaultHeight: 75, hoverHeight: 85 }, { defaultHeight: 80, hoverHeight: 70 }, ]; const BentoAnimatedBarChart = ({ bars = defaultBars, className = "", barClassName = "", }: BentoAnimatedBarChartProps) => { const [activeBar, setActiveBar] = useState(2); // Start at third bar (index 2) useEffect(() => { const interval = setInterval(() => { setActiveBar((prev) => (prev + 1) % bars.length); }, 3000); return () => clearInterval(interval); }, [bars.length]); return (