// Mock data para Monitoramento de Solicitações
// Simula solicitações de liberação em diferentes status

export const mockRequests = [
  {
    id: 'req-001',
    driverName: 'João Silva',
    driverCpf: '123.456.789-00',
    plate: 'ABC-1234',
    operation: 'PRALOG',
    origin: 'São Paulo - SP',
    destination: 'Rio de Janeiro - RJ',
    cargoValue: 150000,
    status: 'PENDING',
    createdAt: new Date(Date.now() - 3600000).toISOString(), // 1 hora atrás
    riskLevel: 'MEDIUM',
    processedBy: null,
    processedAt: null,
    approvedBy: null,
    approvedAt: null
  },
  {
    id: 'req-002',
    driverName: 'Maria Santos',
    driverCpf: '987.654.321-00',
    plate: 'XYZ-9876',
    operation: 'PROFARMA',
    origin: 'Belo Horizonte - MG',
    destination: 'Complexo da Maré - RJ',
    cargoValue: 600000,
    status: 'PENDING',
    processedBy: 'Supervisor João',
    processedAt: new Date(Date.now() - 1800000).toISOString(), // 30 min atrás
    createdAt: new Date(Date.now() - 7200000).toISOString(), // 2 horas atrás
    riskLevel: 'HIGH',
    approvedBy: null,
    approvedAt: null
  },
  {
    id: 'req-003',
    driverName: 'Carlos Oliveira',
    driverCpf: '111.222.333-44',
    plate: 'DEF-5678',
    operation: 'PETY',
    origin: 'Curitiba - PR',
    destination: 'Florianópolis - SC',
    cargoValue: 45000,
    status: 'LIBERADO',
    processedBy: 'Supervisor Maria',
    processedAt: new Date(Date.now() - 5400000).toISOString(),
    approvedBy: 'GR Pedro',
    approvedAt: new Date(Date.now() - 3600000).toISOString(),
    createdAt: new Date(Date.now() - 10800000).toISOString(), // 3 horas atrás
    riskLevel: 'LOW',
    cte: 'CTE123456',
    ae: 789012,
    pallet: '10',
    routeImageUrl: '/uploads/route-003.jpg',
    customMessage: 'Rota aprovada. Evitar Av. Brasil.'
  },
  {
    id: 'req-004',
    driverName: 'Ana Costa',
    driverCpf: '555.666.777-88',
    plate: 'GHI-3456',
    operation: 'MERCADO_LIVRE',
    origin: 'Porto Alegre - RS',
    destination: 'São Paulo - SP',
    cargoValue: 250000,
    status: 'EM_ROTA',
    processedBy: 'Supervisor João',
    processedAt: new Date(Date.now() - 14400000).toISOString(),
    approvedBy: 'GR Ana',
    approvedAt: new Date(Date.now() - 10800000).toISOString(),
    createdAt: new Date(Date.now() - 18000000).toISOString(), // 5 horas atrás
    riskLevel: 'MEDIUM',
    cte: 'CTE789012',
    ae: 456789,
    pallet: '15',
    routeImageUrl: '/uploads/route-004.jpg'
  },
  {
    id: 'req-005',
    driverName: 'Roberto Lima',
    driverCpf: '999.888.777-66',
    plate: 'JKL-7890',
    operation: 'PRALOG',
    origin: 'Brasília - DF',
    destination: 'Goiânia - GO',
    cargoValue: 80000,
    status: 'FINALIZADO',
    processedBy: 'Supervisor Maria',
    processedAt: new Date(Date.now() - 86400000).toISOString(),
    approvedBy: 'GR Pedro',
    approvedAt: new Date(Date.now() - 82800000).toISOString(),
    createdAt: new Date(Date.now() - 90000000).toISOString(), // 25 horas atrás
    riskLevel: 'LOW',
    cte: 'CTE345678',
    ae: 123456,
    finishedAt: new Date(Date.now() - 7200000).toISOString()
  },
  {
    id: 'req-006',
    driverName: 'Patricia Souza',
    driverCpf: '444.333.222-11',
    plate: 'MNO-1122',
    operation: 'PROFARMA',
    origin: 'Salvador - BA',
    destination: 'Recife - PE',
    cargoValue: 180000,
    status: 'PENDING',
    createdAt: new Date(Date.now() - 1800000).toISOString(), // 30 min atrás
    riskLevel: 'MEDIUM',
    processedBy: null,
    processedAt: null
  }
];

// Estatísticas para dashboard
export const mockStats = {
  pending: mockRequests.filter(r => r.status === 'PENDING').length,
  inAnalysis: mockRequests.filter(r => r.status === 'PENDING' && r.processedBy).length,
  approved: mockRequests.filter(r => r.status === 'LIBERADO').length,
  inRoute: mockRequests.filter(r => r.status === 'EM_ROTA').length,
  finished: mockRequests.filter(r => r.status === 'FINALIZADO').length,
  highRisk: mockRequests.filter(r => r.riskLevel === 'HIGH').length
};
