import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useColors } from '../../lib/theme'; /** * Sticky Bottom-Bar mit Primary-CTA (+ optional Secondary darĂ¼ber). * Layout-Pattern aus Duolingo: voll-breit, padding, SafeArea-aware. */ export function CTABar({ primaryLabel, onPrimary, primaryDisabled, primaryLoading, secondaryLabel, onSecondary, }: { primaryLabel: string; onPrimary: () => void; primaryDisabled?: boolean; primaryLoading?: boolean; secondaryLabel?: string; onSecondary?: () => void; }) { const colors = useColors(); const insets = useSafeAreaInsets(); const disabled = !!primaryDisabled || !!primaryLoading; return ( {primaryLoading ? ( ) : ( {primaryLabel} )} {secondaryLabel && onSecondary ? ( {secondaryLabel} ) : null} ); }