import React, { useState } from "react"; // Animaci贸n fade-in/slide-up para bloques const fadeInSlideUp = `@keyframes fadein-slideup { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } }`; if (typeof document !== 'undefined' && !document.getElementById('fadein-slideup-reportes')) { const style = document.createElement('style'); style.id = 'fadein-slideup-reportes'; style.innerHTML = fadeInSlideUp; document.head.appendChild(style); } export default function Reportes() { const [tipoReporte, setTipoReporte] = useState(''); const [fechaInicio, setFechaInicio] = useState(''); const [fechaFin, setFechaFin] = useState(''); // Datos de ejemplo const reportes = [ { id: 1, nombre: 'Reporte de usuarios activos', tipo: 'Usuarios', fecha: '2025-08-07', estado: 'Completado' }, { id: 2, nombre: 'An谩lisis de documentos procesados', tipo: 'Documentos', fecha: '2025-08-06', estado: 'Procesando' }, { id: 3, nombre: 'Resumen de procesos aduaneros', tipo: 'Procesos', fecha: '2025-08-05', estado: 'Completado' }, { id: 4, nombre: 'Estad铆sticas generales del sistema', tipo: 'General', fecha: '2025-08-04', estado: 'Completado' }, { id: 5, nombre: 'Reporte de expedientes', tipo: 'Documentos', fecha: '2025-08-03', estado: 'Error' }, ]; const getEstadoBadge = (estado) => { const styles = { 'Completado': 'bg-emerald-100 text-emerald-800 border-emerald-200', 'Procesando': 'bg-yellow-100 text-yellow-800 border-yellow-200', 'Error': 'bg-red-100 text-red-800 border-red-200' }; return styles[estado] || 'bg-gray-100 text-gray-800 border-gray-200'; }; const limpiarFiltros = () => { setTipoReporte(''); setFechaInicio(''); setFechaFin(''); }; return (
{/* Header principal */}

Centro de Reportes

Consulta, genera y descarga reportes relacionados con el sistema aduanero

馃搳 {reportes.length} reportes disponibles
{/* Panel de filtros mejorado */}

Filtros de b煤squeda

{/* Tipo de reporte */}
{/* Fecha inicio */}
setFechaInicio(e.target.value)} className="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white" />
{/* Fecha fin */}
setFechaFin(e.target.value)} className="w-full border border-gray-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white" />
{/* Bot贸n filtrar */}
{/* Bot贸n limpiar */}
{/* Secci贸n de resultados */}
{/* Header de la secci贸n */}

Reportes disponibles

馃搵 {reportes.length} reportes encontrados
{/* Bot贸n descargar masivo */}
{/* Contenido de reportes */}
{/* Vista Desktop - Tabla */}
{reportes.map((reporte, index) => ( ))}
ID Nombre del Reporte Tipo Fecha Estado Acciones
#{reporte.id.toString().padStart(3, '0')}
{reporte.nombre}
{reporte.tipo} {new Date(reporte.fecha).toLocaleDateString('es-ES', { year: 'numeric', month: 'short', day: 'numeric' })} {reporte.estado}
{/* Vista Mobile - Cards */}
{reportes.map((reporte, index) => (
#{reporte.id.toString().padStart(3, '0')} {reporte.estado}

{reporte.nombre}

{reporte.tipo} {new Date(reporte.fecha).toLocaleDateString('es-ES', { year: 'numeric', month: 'short', day: 'numeric' })}
))}
); }