'use client' import { useState } from 'react' import { useFinanzasStore } from '@/lib/store' import { predictNextBill, calculateTrend } from '@/lib/predictions' import { formatCurrency } from '@/lib/utils' import { Zap, Droplets, Flame, Wifi, TrendingUp, TrendingDown, Plus, History } from 'lucide-react' import { cn } from '@/lib/utils' import { AddServiceModal } from '@/components/modals/AddServiceModal' const SERVICES = [ { id: 'electricity', label: 'Luz (Electricidad)', icon: Zap, color: 'text-yellow-400', bg: 'bg-yellow-400/10' }, { id: 'water', label: 'Agua', icon: Droplets, color: 'text-blue-400', bg: 'bg-blue-400/10' }, { id: 'gas', label: 'Gas', icon: Flame, color: 'text-orange-400', bg: 'bg-orange-400/10' }, { id: 'internet', label: 'Internet', icon: Wifi, color: 'text-cyan-400', bg: 'bg-cyan-400/10' }, ] export default function ServicesPage() { const serviceBills = useFinanzasStore((state) => state.serviceBills) const [isAddModalOpen, setIsAddModalOpen] = useState(false) return (
Gestiona tus consumos de Luz, Agua y Gas.
{service.label}
{lastBill ? `Ăšltimo: ${formatCurrency(lastBill.amount)}` : 'Sin historial'}
{service?.label || bill.type}
{new Date(bill.date).toLocaleDateString('es-AR', { dateStyle: 'long' })}
{formatCurrency(bill.amount)}
{bill.period}