import { ReactNode } from 'react'; import { ScrollView, TouchableOpacity, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Ionicons } from '@expo/vector-icons'; import { useColors } from '../../lib/theme'; import { SlideProgress } from './SlideProgress'; import { useOnboardingBack } from './OnboardingNavContext'; /** * Layout-Wrapper für alle Onboarding-Slides. * * ┌──────────────────────────────┐ * │ [Top-Padding + SafeArea] │ * │ ────── Progress-Bar ───── │ * │ │ * │ │ * │ │ * │ ───── CTABar (sticky) ───── │ * └──────────────────────────────┘ * * `cta` wird IM Shell gerendert (sticky-bottom + SafeArea). Slides müssen * ihre Inhalte als `children` reinpacken (= scrollbarer Content-Bereich). */ export function OnboardingShell({ current, total, children, cta, }: { current: number; total: number; children: ReactNode; cta: ReactNode; }) { const colors = useColors(); const insets = useSafeAreaInsets(); const goBack = useOnboardingBack(); return ( {goBack ? ( ) : null} {children} {cta} ); }