import React from 'react'; import { View, StyleSheet, TouchableOpacity } from 'react-native'; import Modal from '../atoms/Modal'; import Text from '../atoms/Text'; import Icon from '../atoms/Icon'; interface PinModalProps { visible: boolean; pinCode: string; pinError: boolean; onClose: () => void; onPinInput: (digit: string) => void; onPinDelete: () => void; } export default function PinModal({ visible, pinCode, pinError, onClose, onPinInput, onPinDelete, }: PinModalProps) { return ( 🔐 Dev Settings PIN-Code eingeben {[0, 1, 2, 3].map((index) => ( index && styles.pinDotFilled, pinError && styles.pinDotError, ]} /> ))} {pinError && Falscher PIN-Code} {['1', '2', '3'].map((digit) => ( onPinInput(digit)} > {digit} ))} {['4', '5', '6'].map((digit) => ( onPinInput(digit)} > {digit} ))} {['7', '8', '9'].map((digit) => ( onPinInput(digit)} > {digit} ))} onPinInput('0')}> 0 ); } const styles = StyleSheet.create({ pinModalContent: { alignItems: 'center', width: '100%', }, pinCloseButton: { position: 'absolute', top: -8, right: -8, zIndex: 1, padding: 8, }, pinTitle: { fontSize: 24, marginBottom: 8, marginTop: 8, }, pinSubtitle: { color: '#A0A0A0', fontSize: 16, marginBottom: 32, }, pinDotsContainer: { flexDirection: 'row', gap: 16, marginBottom: 24, }, pinDot: { width: 16, height: 16, borderRadius: 8, borderWidth: 2, borderColor: '#666666', backgroundColor: 'transparent', }, pinDotFilled: { backgroundColor: '#FFCB00', borderColor: '#FFCB00', }, pinDotError: { borderColor: '#FF4444', backgroundColor: 'rgba(255, 68, 68, 0.2)', }, pinErrorText: { color: '#FF4444', fontSize: 14, marginBottom: 16, position: 'absolute', top: 160, }, pinPad: { marginTop: 24, }, pinRow: { flexDirection: 'row', gap: 20, marginBottom: 16, }, pinButton: { width: 70, height: 70, borderRadius: 35, backgroundColor: '#333333', justifyContent: 'center', alignItems: 'center', }, pinButtonInvisible: { opacity: 0, }, pinButtonText: { color: '#FFFFFF', fontSize: 24, fontWeight: '600', }, });