import { Modal, Pressable, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Divider } from '../../atoms/Divider'; import { Icon } from '../../atoms/Icon'; import { Text } from '../../atoms/Text'; import { cn } from '../../lib/cn'; import type { ConfirmActionSheetProps } from './ConfirmActionSheet.types'; /** * Hoja de acciones modal con backdrop y opciones (icon + label). * Reemplazo del antiguo `ActionSheet` (que dependía de Paper). */ export function ConfirmActionSheet({ visible, onClose, options, title, description, }: ConfirmActionSheetProps) { const insets = useSafeAreaInsets(); return ( {title || description ? ( {title ? ( {title} ) : null} {description ? ( {description} ) : null} ) : null} {options.map((option, idx) => { const handlePress = () => { if (option.disabled) { return; } onClose(); option.onPress(); }; return ( {idx > 0 ? : null} {option.icon ? ( ) : null} {option.label} ); })} ); }