import React from 'react'; import { Download, Share2, X } from 'lucide-react'; import { YStack, XStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Pressable } from '@tamagui/react-native-web-lite'; import { InstallBannerState } from '../lib/installBanner'; import { CTAButton, MobileCard } from './Primitives'; import { useTranslation } from 'react-i18next'; import { useAdminTheme } from '../theme'; type MobileInstallBannerProps = { state: InstallBannerState | null; onInstall?: () => void; onDismiss?: () => void; density?: 'default' | 'compact'; }; export function MobileInstallBanner({ state, onInstall, onDismiss, density = 'default', }: MobileInstallBannerProps) { const { t } = useTranslation('common'); const { textStrong, muted, border, primary, surfaceMuted, accentSoft } = useAdminTheme(); if (!state) { return null; } const isPrompt = state.variant === 'prompt'; const isCompact = density === 'compact'; 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 && isCompact ? ( {t('installBanner.action', 'Install')} ) : null} {onDismiss ? ( ) : null} {isPrompt && onInstall && !isCompact ? ( ) : null} ); }