import React from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { XStack, YStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Button } from '@tamagui/button'; import { Home, Image, Share2 } from 'lucide-react'; import { useEventData } from '../context/EventDataContext'; import { buildEventPath } from '../lib/routes'; import { useTranslation } from '@/guest/i18n/useTranslation'; import { useGuestThemeVariant } from '../lib/guestTheme'; export default function BottomDock() { const location = useLocation(); const navigate = useNavigate(); const { token } = useEventData(); const { t } = useTranslation(); const { isDark } = useGuestThemeVariant(); const dockItems = [ { key: 'home', label: t('navigation.home', 'Home'), path: '/', icon: Home }, { key: 'gallery', label: t('navigation.gallery', 'Gallery'), path: '/gallery', icon: Image }, { key: 'share', label: t('navigation.share', 'Share'), path: '/share', icon: Share2 }, ]; const activeIconColor = isDark ? '#F8FAFF' : '#0F172A'; const inactiveIconColor = isDark ? '#94A3B8' : '#64748B'; return ( {dockItems.map((item) => { const targetPath = buildEventPath(token, item.path); const active = location.pathname === targetPath || (item.path !== '/' && location.pathname.startsWith(targetPath)); const Icon = item.icon; return ( ); })} ); }