import { View, Text, Pressable, StyleSheet } from 'react-native' import { colors, spacing, radii, typography } from '../theme/mobile-theme' import { BottomDrawer } from './BottomDrawer' type Props = { visible: boolean title: string message?: string confirmLabel?: string cancelLabel?: string destructive?: boolean onConfirm: () => void onCancel: () => void } export function ConfirmModal({ visible, title, message, confirmLabel = 'Confirm', cancelLabel = 'Cancel', destructive = false, onConfirm, onCancel }: Props) { return ( {title} {message ? {message} : null} [styles.button, styles.cancelButton, pressed && styles.pressed]} onPress={onCancel} > {cancelLabel} [ styles.button, destructive ? styles.destructiveButton : styles.confirmButton, pressed && styles.pressed ]} onPress={() => { onConfirm() onCancel() }} > {confirmLabel} ) } const styles = StyleSheet.create({ content: { paddingBottom: spacing.lg }, title: { fontSize: 16, fontWeight: '700', color: colors.textPrimary }, message: { fontSize: typography.bodySize, color: colors.textSecondary, marginTop: spacing.xs, lineHeight: 20 }, buttons: { flexDirection: 'row', gap: spacing.sm }, button: { flex: 1, paddingVertical: spacing.sm + 2, borderRadius: radii.button, alignItems: 'center' }, cancelButton: { backgroundColor: colors.bgPanel }, confirmButton: { backgroundColor: colors.textPrimary }, destructiveButton: { backgroundColor: colors.statusRed }, pressed: { opacity: 0.7 }, cancelText: { fontSize: typography.bodySize, fontWeight: '600', color: colors.textSecondary }, confirmText: { fontSize: typography.bodySize, fontWeight: '600', color: colors.bgBase }, destructiveText: { fontSize: typography.bodySize, fontWeight: '600', color: '#fff' } })