import React from 'react'; import { Modal, View, Text, StyleSheet, TouchableOpacity, Linking } from 'react-native'; import { MaterialIcons } from '@expo/vector-icons'; import { useTheme } from '../contexts/ThemeContext'; interface Props { visible: boolean; latestTag?: string; releaseNotes?: string; releaseUrl?: string; onDismiss: () => void; onLater: () => void; } const MajorUpdateOverlay: React.FC = ({ visible, latestTag, releaseNotes, releaseUrl, onDismiss, onLater }) => { const { currentTheme } = useTheme(); if (!visible) return null; return ( Major update available {!!latestTag && ( Latest: {latestTag} )} {!!releaseNotes && ( {releaseNotes} )} {releaseUrl ? ( Linking.openURL(releaseUrl)}> View release ) : null} Later Dismiss ); }; const styles = StyleSheet.create({ backdrop: { flex: 1, backgroundColor: 'rgba(0,0,0,0.8)', alignItems: 'center', justifyContent: 'center', padding: 20 }, card: { width: 380, maxWidth: '100%', borderRadius: 20, borderWidth: 1, overflow: 'hidden' }, header: { alignItems: 'center', paddingTop: 28, paddingBottom: 16, paddingHorizontal: 20 }, iconCircle: { width: 56, height: 56, borderRadius: 28, alignItems: 'center', justifyContent: 'center', marginBottom: 12 }, title: { fontSize: 20, fontWeight: '700', marginBottom: 6 }, version: { fontSize: 14 }, notesBox: { marginHorizontal: 20, marginBottom: 16, padding: 12, borderRadius: 12, backgroundColor: 'rgba(255,255,255,0.08)' }, notes: { fontSize: 14, lineHeight: 20 }, actions: { paddingHorizontal: 20, paddingBottom: 20 }, primaryBtn: { flexDirection: 'row', alignItems: 'center', gap: 8, justifyContent: 'center', paddingVertical: 12, borderRadius: 12, marginBottom: 12 }, primaryText: { color: '#fff', fontSize: 16, fontWeight: '600' }, secondaryRow: { flexDirection: 'row', gap: 10 }, secondaryBtn: { flex: 1, alignItems: 'center', justifyContent: 'center', paddingVertical: 12, borderRadius: 12, borderWidth: 1 }, secondaryText: { fontSize: 15, fontWeight: '500' }, }); export default MajorUpdateOverlay;