import { useState } from 'react'; import { AppShell, Group, ActionIcon, rem, Button, Select, Title, Image, useMantineColorScheme, } from '@mantine/core'; import { Settings, ArrowLeft } from 'lucide-react'; import { StyledTooltip } from '../StyledTooltip'; import { soundAssets, playSound } from '../../utils/sounds'; import iconUrl from '/icon.png'; import './AppHeader.css'; type Screen = 'download' | 'launch' | 'interface'; interface AppHeaderProps { currentScreen: Screen | null; activeInterfaceTab: string | null; setActiveInterfaceTab: (tab: string | null) => void; isImageGenerationMode: boolean; onEject: () => void; onSettingsOpen: () => void; } export const AppHeader = ({ currentScreen, activeInterfaceTab, setActiveInterfaceTab, isImageGenerationMode, onEject, onSettingsOpen, }: AppHeaderProps) => { const [logoClickCount, setLogoClickCount] = useState(0); const [isElephantMode, setIsElephantMode] = useState(false); const [isMouseSqueaking, setIsMouseSqueaking] = useState(false); const { colorScheme } = useMantineColorScheme(); const handleLogoClick = () => { setLogoClickCount((prev) => prev + 1); try { if (logoClickCount >= 10 && Math.random() < 0.1) { setIsElephantMode(true); playSound(soundAssets.elephant, 0.6); setTimeout(() => { setIsElephantMode(false); }, 1500); } else { setIsMouseSqueaking(true); const squeakNumber = Math.floor(Math.random() * 5); playSound(soundAssets.mouseSqueaks[squeakNumber], 0.4); setTimeout(() => { setIsMouseSqueaking(false); }, 300); } } catch { void 0; } }; return (
{currentScreen === 'interface' ? ( ) : ( Friendly Kobold Friendly Kobold )}
{currentScreen === 'interface' && (