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 { withAlpha } from './colors'; import { useAdminTheme } from '../theme'; 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 { background, surface, border, text, primary, glassSurfaceStrong, glassBorder, appBackground } = useAdminTheme(); const headerSurface = glassSurfaceStrong ?? withAlpha(surface, 0.94); const headerBorder = glassBorder ?? border; return ( {onBack ? ( {t('actions.back', 'Back')} ) : ( )} {title} {rightSlot ?? null} {children} {footer ? {footer} : null} ); }