import React, { useState } from 'react'; import { ChevronLeft, Menu, User, Plus, Grid, List, ArrowDownAZ, Pin, X, Coffee, Tablet, Trash2, Utensils, Syringe, Timer } from 'lucide-react'; import { Button } from "../ui/button"; import { cn } from "../ui/utils"; // Mock Data for Timers const timersData = [ { id: 1, title: 'Coffee - 2 hrs', subtitle: '1 min - Completes at 12:05 PM', totalTime: 7200, // seconds remainingTime: 0, status: 'expired', icon: Coffee, }, { id: 2, title: 'Clean Tablet', subtitle: '1 hrs - Completes at 12:37 PM', totalTime: 3600, remainingTime: 237, // 3:57 status: 'running', icon: Tablet, }, { id: 3, title: 'Replace Sanitizer Towels', subtitle: '1 hrs - Completes at 12:37 PM', totalTime: 3600, remainingTime: 238, // 3:58 status: 'running', icon: Trash2, }, { id: 4, title: 'Take Out Trash', subtitle: '1 hrs - Completes at 01:03 PM', totalTime: 3600, remainingTime: 58, // 00:58 status: 'running', icon: Trash2, }, { id: 5, title: 'Change Utensils', subtitle: '1 hrs - Completes at 01:03 PM', totalTime: 3600, remainingTime: 58, status: 'running', icon: Utensils, }, { id: 6, title: 'Sanitize Surfaces', subtitle: '1 hrs - Completes at 02:00 PM', totalTime: 3600, remainingTime: 2157, status: 'running', icon: Syringe, }, { id: 7, title: 'Check Temperatures', subtitle: '1 hrs - Completes at 02:00 PM', totalTime: 3600, remainingTime: 2158, status: 'running', icon: Syringe, }, { id: 8, title: 'Ranch 4 hrs', subtitle: '4 hrs - Completes at 04:04 PM', totalTime: 14400, remainingTime: 2158, status: 'running', icon: Syringe, }, ]; function TimerCard({ timer }: { timer: typeof timersData[0] }) { // Calculate progress percentage for circle const progress = ((timer.totalTime - timer.remainingTime) / timer.totalTime) * 100; const isExpired = timer.remainingTime === 0; // Format remaining time MM:SS or similar const formatTime = (seconds: number) => { if (seconds <= 0) return "0s"; const m = Math.floor(seconds / 60); const s = seconds % 60; return `${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`; }; return (
{timer.subtitle}
Timer expired at 12:05 PM
Please discard the coffee