import React from 'react'; import { CustomReminder } from '../../types'; import { TrashIcon, EditIcon, PlusIcon, getReminderIcon } from '../icons/Icons'; interface ManageRemindersModalProps { isOpen: boolean; onClose: () => void; reminders: CustomReminder[]; onAdd: () => void; onDelete: (reminder: CustomReminder) => void; onEdit: (reminder: CustomReminder) => void; } const ManageRemindersModal: React.FC = ({ isOpen, onClose, reminders, onAdd, onDelete, onEdit, }) => { const handleDeleteConfirmation = (reminder: CustomReminder) => { if ( window.confirm( `Are you sure you want to delete the reminder "${reminder.title}"?` ) ) { onDelete(reminder); } }; if (!isOpen) return null; return (

Manage Custom Reminders

{reminders.length > 0 ? (
    {reminders.map(rem => { const ReminderIcon = getReminderIcon(rem.icon); return (
  • {rem.title}

    Every {rem.frequencyMinutes} mins from {rem.startTime}{' '} to {rem.endTime}

  • ); })}
) : (

No custom reminders have been added yet.

)}
); }; export default ManageRemindersModal;