import React, { useState } from 'react'; import { Calendar, Clock, MapPin, User, ChevronLeft, ChevronRight } from 'lucide-react'; interface Event { id: string; title: string; date: string; time: string; location: string; client: string; status: 'confirmed' | 'pending' | 'completed'; type: 'formatura' | 'casamento' | 'evento'; } const MOCK_EVENTS: Event[] = [ { id: '1', title: 'Formatura Medicina UFPR', date: '2025-12-15', time: '19:00', location: 'Teatro Guaíra, Curitiba', client: 'Ana Paula Silva', status: 'confirmed', type: 'formatura' }, { id: '2', title: 'Casamento Maria & João', date: '2025-12-20', time: '16:00', location: 'Fazenda Vista Alegre', client: 'Maria Santos', status: 'confirmed', type: 'casamento' }, { id: '3', title: 'Formatura Direito PUC', date: '2025-12-22', time: '20:00', location: 'Centro de Convenções', client: 'Carlos Eduardo', status: 'pending', type: 'formatura' }, { id: '4', title: 'Formatura Engenharia UTFPR', date: '2025-12-28', time: '18:30', location: 'Espaço Nobre Eventos', client: 'Roberto Mendes', status: 'confirmed', type: 'formatura' }, { id: '5', title: 'Evento Corporativo Tech Summit', date: '2026-01-10', time: '09:00', location: 'Hotel Bourbon', client: 'TechCorp Ltda', status: 'pending', type: 'evento' }, { id: '6', title: 'Formatura Odontologia', date: '2026-01-15', time: '19:30', location: 'Clube Curitibano', client: 'Juliana Costa', status: 'confirmed', type: 'formatura' } ]; export const CalendarPage: React.FC = () => { const [selectedMonth, setSelectedMonth] = useState(new Date()); const [selectedEvent, setSelectedEvent] = useState(null); const getStatusColor = (status: Event['status']) => { switch (status) { case 'confirmed': return 'bg-green-100 text-green-800'; case 'pending': return 'bg-yellow-100 text-yellow-800'; case 'completed': return 'bg-gray-100 text-gray-800'; } }; const getStatusLabel = (status: Event['status']) => { switch (status) { case 'confirmed': return 'Confirmado'; case 'pending': return 'Pendente'; case 'completed': return 'Concluído'; } }; const getTypeColor = (type: Event['type']) => { switch (type) { case 'formatura': return 'bg-blue-100 text-blue-800'; case 'casamento': return 'bg-pink-100 text-pink-800'; case 'evento': return 'bg-purple-100 text-purple-800'; } }; const getTypeLabel = (type: Event['type']) => { switch (type) { case 'formatura': return 'Formatura'; case 'casamento': return 'Casamento'; case 'evento': return 'Evento'; } }; const formatDate = (dateString: string) => { const date = new Date(dateString + 'T00:00:00'); return date.toLocaleDateString('pt-BR', { day: '2-digit', month: 'long', year: 'numeric' }); }; const nextMonth = () => { setSelectedMonth(new Date(selectedMonth.getFullYear(), selectedMonth.getMonth() + 1)); }; const prevMonth = () => { setSelectedMonth(new Date(selectedMonth.getFullYear(), selectedMonth.getMonth() - 1)); }; const currentMonthName = selectedMonth.toLocaleDateString('pt-BR', { month: 'long', year: 'numeric' }); // Filter events for selected month const monthEvents = MOCK_EVENTS.filter(event => { const eventDate = new Date(event.date + 'T00:00:00'); return eventDate.getMonth() === selectedMonth.getMonth() && eventDate.getFullYear() === selectedMonth.getFullYear(); }); // Sort events by date const sortedEvents = [...MOCK_EVENTS].sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime() ); return (
{/* Header */}

Minha Agenda

Gerencie seus eventos e compromissos fotográficos

{/* Calendar Navigation */}

{currentMonthName}

Eventos este mês: {monthEvents.length}
Total de eventos: {MOCK_EVENTS.length}

Legenda

Confirmado
Pendente
Concluído
{/* Events List */}

Próximos Eventos

{sortedEvents.length === 0 ? (

Nenhum evento agendado

) : ( sortedEvents.map((event) => (
setSelectedEvent(event)} >

{event.title}

{getTypeLabel(event.type)}
{formatDate(event.date)}
{event.time}
{event.location}
{event.client}
{getStatusLabel(event.status)}
)) )}
{/* Event Detail Modal */} {selectedEvent && (
setSelectedEvent(null)} >
e.stopPropagation()} >

{selectedEvent.title}

{getTypeLabel(selectedEvent.type)} {getStatusLabel(selectedEvent.status)}
{formatDate(selectedEvent.date)}
{selectedEvent.time}
{selectedEvent.location}
{selectedEvent.client}
)}
); };