import { Card, CardContent, Box, Typography, Chip, IconButton, Tooltip, Divider } from '@mui/material' import { Check, Bell, X, MapPin, Calendar } from 'lucide-react' import type { Reminder } from '../../domain/reminder' import { ReminderPriorityBadge } from './ReminderPriorityBadge' import { ReminderTypeBadge } from './ReminderTypeBadge' import { ReminderDaysIndicator } from './ReminderDaysIndicator' import { useCompleteReminder, useDismissReminder, useSnoozeReminder } from '../../hooks/useReminders' import { useReminderStore } from '../../stores/reminderStore' import { ReminderStatus } from '../../domain/reminder' const STATUS_CHIP_COLOR: Record = { ACTIVE: 'info', SNOOZED: 'warning', COMPLETED: 'success', DISMISSED: 'default', } const STATUS_LABEL: Record = { ACTIVE: 'Aktiv', SNOOZED: 'Schlummernd', COMPLETED: 'Erledigt', DISMISSED: 'Verworfen', } interface Props { reminder: Reminder } export function ReminderCard({ reminder }: Props) { const { setSelectedId, setDrawerOpen } = useReminderStore() const complete = useCompleteReminder() const dismiss = useDismissReminder() const snooze = useSnoozeReminder() const isActionable = reminder.status === ReminderStatus.ACTIVE || reminder.status === ReminderStatus.SNOOZED return ( { setSelectedId(reminder.id); setDrawerOpen(true) }} > {/* Top row */} {/* Property */} {reminder.propertyTitle} {reminder.propertyCity}{reminder.propertyDistrict ? ` · ${reminder.propertyDistrict}` : ''} {reminder.tenantName} · {reminder.areaSqm.toLocaleString('de-CH')} m² {/* Due date */} Fällig: {new Date(reminder.dueDate).toLocaleDateString('de-CH')} {/* Actions */} {isActionable && ( e.stopPropagation()}> complete.mutate({ id: reminder.id })} sx={{ color: '#16a34a', border: '1px solid #dcfce7', borderRadius: 1 }} > snooze.mutate({ id: reminder.id, until: '2026-05-27' })} sx={{ color: '#ca8a04', border: '1px solid #fef9c3', borderRadius: 1 }} > dismiss.mutate({ id: reminder.id })} sx={{ color: '#dc2626', border: '1px solid #fee2e2', borderRadius: 1 }} > )} ) }