import React from 'react'; import { ActivityIndicator, Modal, Pressable, Text, View } from 'react-native'; import { styles } from '../../styles'; export type AgentAction = { key: string; label: string; icon: React.ReactNode; destructive?: boolean; onPress: () => void; }; /** Bottom action sheet listing the actions available for a single agent. */ export function AgentActionsSheet({ visible, title, actions, onClose, }: { visible: boolean; title?: string; actions: AgentAction[]; onClose: () => void; }) { return ( {title ? {title} : null} {actions.map((action) => ( [styles.sheetAction, pressed && styles.sheetRowPressed]} > {action.icon} {action.label} ))} [styles.sheetCancel, pressed && styles.sheetRowPressed]} > Cancel ); } /** Lightweight confirm dialog (used for destructive actions like delete). */ export function ConfirmDialog({ visible, title, message, confirmLabel, destructive = false, isBusy = false, onCancel, onConfirm, }: { visible: boolean; title: string; message: string; confirmLabel: string; destructive?: boolean; isBusy?: boolean; onCancel: () => void; onConfirm: () => void; }) { return ( {title} {message} [styles.confirmBtn, styles.confirmBtnCancel, pressed && styles.sheetRowPressed]} > Cancel [ styles.confirmBtn, destructive ? styles.confirmBtnDanger : styles.confirmBtnPrimary, pressed && styles.pressed, ]} > {isBusy ? ( // Inline white so it stays white on the colored button in both // schemes — the themed stylesheet would otherwise remap #FFFFFF. ) : ( {confirmLabel} )} ); }