"use client"; import { motion, useReducedMotion } from "framer-motion"; const rainDrops = Array.from({ length: 32 }, (_, index) => ({ left: `${(index * 29 + 7) % 101}%`, delay: (index % 16) * 0.08, duration: 0.82 + (index % 5) * 0.1, lengthClass: index % 3 === 0 ? "h-16" : index % 3 === 1 ? "h-12" : "h-9", opacity: index % 3 === 0 ? 0.58 : index % 3 === 1 ? 0.48 : 0.36, })); const mistDrops = Array.from({ length: 18 }, (_, index) => ({ left: `${(index * 37 + 19) % 101}%`, delay: (index % 9) * 0.16, duration: 1.35 + (index % 4) * 0.12, })); const lightningBolts = [ { className: "left-[18%] top-[4%] h-44 w-24", path: "M62 0 L42 39 L56 36 L35 88 L48 84 L28 142", delay: 0, opacity: 0.78, }, { className: "left-[42%] top-[-4%] h-52 w-28", path: "M38 0 L61 47 L45 43 L72 101 L57 96 L82 164", delay: 0.34, opacity: 0.86, }, { className: "right-[12%] top-[22%] h-48 w-24", path: "M70 0 L48 52 L63 49 L36 108 L52 103 L24 170", delay: 0.72, opacity: 0.68, }, { className: "right-[34%] top-[44%] h-32 w-20", path: "M28 0 L44 33 L33 31 L52 75 L41 72 L60 116", delay: 1.08, opacity: 0.5, }, ]; export function WeatherEffects({ precipitation10m, thunderstorm = false, }: { precipitation10m?: number | null; thunderstorm?: boolean; }) { const reduceMotion = useReducedMotion(); const isRaining = (precipitation10m ?? 0) > 0; return ( ); }