'use client'; import React from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { useTransition } from './TransitionProvider'; import Image from 'next/image'; export function PageTransitionShutter() { const { isTransitioning, transitionMessage } = useTransition(); return ( {isTransitioning && ( {/* Subtle grid background */}
{/* Deep Glow inside the Shutter */}
{/* Single Masked Logo Container to prevent double-logo offset */}
{/* Base logo color (slightly dimmed to make the sweep visible) */}
{/* Sweeping intense white light */}
{/* Transition Message or Graphical Visualizer */} {transitionMessage && ( transitionMessage.startsWith('LANG_SWITCH:') ? ( (() => { const [, fromLang, toLang] = transitionMessage.split(':'); return ( {/* Old Language Flag - Fading out */}
{fromLang}
{/* Animated Arrow connecting them */}
{/* New Language Flag - Intense Glow */}
{toLang}
); })() ) : ( {transitionMessage} ) )}
)} ); }