import { useRouter } from 'expo-router'; import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { DitherBackground } from '../../src/components/DitherBackground'; import { CameraIcon } from '../../src/components/Icons'; import { LetterRow } from '../../src/components/LetterRow'; import { letters } from '../../src/data/letters'; import { colors, font, glow, radius, shadow, space } from '../../src/theme'; /** Home, design option 4b: the scan card carries the dither gradient. */ export default function Home() { const router = useRouter(); const insets = useSafeAreaInsets(); const openDeadline = letters.find((l) => l.deadlineDays !== undefined); return ( Hallo Lena! Ein neuer Brief? Kein Stress – wir helfen dir. [styles.scanCard, pressed && styles.pressed]} onPress={() => router.push('/scan')} accessibilityRole="button" accessibilityLabel="Brief scannen" > Brief scannen Foto machen, fertig! Los geht's {letters.filter((l) => l.deadlineDays !== undefined).length} Frist offen {openDeadline ? `noch ${openDeadline.deadlineDays} Tage` : 'alles erledigt'} {letters.length} Briefe erklärt alles im Archiv Deine Briefe router.push('/(tabs)/archive')} hitSlop={10}> Alle › {letters.slice(0, 2).map((letter) => ( ))} ); } const styles = StyleSheet.create({ screen: { flex: 1, backgroundColor: colors.canvas }, pressed: { opacity: 0.9 }, header: { paddingHorizontal: space.gutter }, greeting: { fontFamily: font.display, fontSize: 28, letterSpacing: -0.5, color: colors.ink }, greetingSub: { fontFamily: font.semibold, fontSize: 15, color: colors.slate, marginTop: 3 }, scanCard: { marginHorizontal: space.gutter, marginTop: 20, borderRadius: radius['4xl'], paddingVertical: 26, paddingHorizontal: 24, overflow: 'hidden', backgroundColor: colors.blueDeep, ...shadow.blueCard, }, scanCardBg: { borderRadius: radius['4xl'] }, scanCardRow: { flexDirection: 'row', alignItems: 'center', gap: 14 }, scanIcon: { width: 56, height: 56, borderRadius: 28, backgroundColor: 'rgba(255,255,255,0.22)', alignItems: 'center', justifyContent: 'center', }, scanCardText: { flex: 1 }, scanTitle: { fontFamily: font.display, fontSize: 22, color: colors.onBlue, ...glow }, scanSub: { fontFamily: font.bold, fontSize: 14, color: colors.onBlue, marginTop: 2, ...glow }, scanCta: { marginTop: 18, backgroundColor: '#FFFFFF', borderRadius: radius.lg, paddingVertical: 14, alignItems: 'center', }, scanCtaLabel: { fontFamily: font.extrabold, fontSize: 16, color: colors.blueDeep }, stats: { flexDirection: 'row', gap: 10, marginHorizontal: space.gutter, marginTop: 14 }, stat: { flex: 1, backgroundColor: colors.surface, borderRadius: radius['2xl'], paddingVertical: 14, paddingHorizontal: 16, ...shadow.card, }, statNumber: { fontFamily: font.display, fontSize: 22 }, statLabel: { fontFamily: font.bold, fontSize: 12.5, color: colors.ink, marginTop: 2 }, statHint: { fontFamily: font.regular, fontSize: 11.5, color: colors.slate }, listHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'baseline', paddingHorizontal: space.gutter, marginTop: 22, }, listTitle: { fontFamily: font.display, fontSize: 17, color: colors.ink }, listAll: { fontFamily: font.extrabold, fontSize: 13, color: colors.blueDeep }, list: { gap: 9, paddingHorizontal: space.gutter, marginTop: 12 }, });