import React from 'react'; import { Download, Share2 } from 'lucide-react'; import { YStack, XStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { useTheme } from '@tamagui/core'; import { InstallBannerState } from '../lib/installBanner'; import { CTAButton, MobileCard } from './Primitives'; import { useTranslation } from 'react-i18next'; type MobileInstallBannerProps = { state: InstallBannerState | null; onInstall?: () => void; }; export function MobileInstallBanner({ state, onInstall }: MobileInstallBannerProps) { const { t } = useTranslation('common'); const theme = useTheme(); const text = String(theme.color12?.val ?? theme.color?.val ?? '#0f172a'); const muted = String(theme.gray11?.val ?? theme.gray?.val ?? '#6b7280'); const border = String(theme.borderColor?.val ?? '#e5e7eb'); const accent = String(theme.primary?.val ?? '#2563eb'); if (!state) { return null; } const isPrompt = state.variant === 'prompt'; return ( {isPrompt ? : } {t('installBanner.title', 'Install Fotospiel Admin')} {isPrompt ? t('installBanner.body', 'Add the app to your home screen for faster access and offline support.') : t('installBanner.iosHint', 'On iOS: Share → Add to Home Screen.')} {isPrompt && onInstall ? ( ) : null} ); }