import React from 'react'; import { YStack, XStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Pressable } from '@tamagui/react-native-web-lite'; import { ChevronLeft } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { useTheme } from '@tamagui/core'; type MobileScaffoldProps = { title: string; onBack?: () => void; rightSlot?: React.ReactNode; children: React.ReactNode; footer?: React.ReactNode; }; export function MobileScaffold({ title, onBack, rightSlot, children, footer }: MobileScaffoldProps) { const { t } = useTranslation('mobile'); const theme = useTheme(); const background = String(theme.background?.val ?? '#f7f8fb'); const surface = String(theme.surface?.val ?? '#ffffff'); const border = String(theme.borderColor?.val ?? '#e5e7eb'); const textColor = String(theme.color?.val ?? '#111827'); return ( {onBack ? ( {t('actions.back', 'Back')} ) : ( )} {title} {rightSlot ?? null} {children} {footer ? {footer} : null} ); }