/* fraud-data.jsx — Mock data for fraud scoring dashboard */

const MOCK_TRANSACTIONS = [
  { id: 'TXN-482917', accountId: 'ACCT-3847', merchant: 'Amazon.com', amount: 127.43, currency: 'USD', region: 'NA', channel: 'online', riskScore: 0.12, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 11, timestamp: Date.now() - 15000 },
  { id: 'TXN-482918', accountId: 'ACCT-7291', merchant: 'CryptoExchange247', amount: 4892.00, currency: 'USD', region: 'NA', channel: 'online', riskScore: 0.91, riskLevel: 'critical', status: 'flagged', flagged: true, reason: 'High-risk merchant', latencyMs: 34, timestamp: Date.now() - 30000 },
  { id: 'TXN-482919', accountId: 'ACCT-1056', merchant: 'Carrefour', amount: 83.21, currency: 'EUR', region: 'EU', channel: 'contactless', riskScore: 0.08, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 14, timestamp: Date.now() - 45000 },
  { id: 'TXN-482920', accountId: 'ACCT-5523', merchant: 'Offshore Gaming Ltd', amount: 7500.00, currency: 'SGD', region: 'APAC', channel: 'online', riskScore: 0.87, riskLevel: 'critical', status: 'flagged', flagged: true, reason: 'Amount exceeds pattern', latencyMs: 42, timestamp: Date.now() - 60000 },
  { id: 'TXN-482921', accountId: 'ACCT-2290', merchant: 'Tesco', amount: 45.80, currency: 'GBP', region: 'EU', channel: 'chip', riskScore: 0.05, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 9, timestamp: Date.now() - 75000 },
  { id: 'TXN-482922', accountId: 'ACCT-8814', merchant: 'QuickCash ATM', amount: 2000.00, currency: 'EUR', region: 'EU', channel: 'ATM', riskScore: 0.73, riskLevel: 'high', status: 'flagged', flagged: true, reason: 'Velocity trigger', latencyMs: 28, timestamp: Date.now() - 90000 },
  { id: 'TXN-482923', accountId: 'ACCT-4401', merchant: 'Walmart', amount: 234.56, currency: 'USD', region: 'NA', channel: 'chip', riskScore: 0.15, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 12, timestamp: Date.now() - 105000 },
  { id: 'TXN-482924', accountId: 'ACCT-6637', merchant: 'Uniqlo', amount: 89.90, currency: 'JPY', region: 'APAC', channel: 'contactless', riskScore: 0.11, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 16, timestamp: Date.now() - 120000 },
  { id: 'TXN-482925', accountId: 'ACCT-3190', merchant: 'Anonymous Gift Cards', amount: 3200.00, currency: 'USD', region: 'NA', channel: 'online', riskScore: 0.82, riskLevel: 'high', status: 'flagged', flagged: true, reason: 'Unusual merchant category', latencyMs: 31, timestamp: Date.now() - 135000 },
  { id: 'TXN-482926', accountId: 'ACCT-9955', merchant: 'Lidl', amount: 52.30, currency: 'EUR', region: 'EU', channel: 'contactless', riskScore: 0.06, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 10, timestamp: Date.now() - 150000 },
  { id: 'TXN-482927', accountId: 'ACCT-1847', merchant: 'Marks & Spencer', amount: 189.00, currency: 'GBP', region: 'EU', channel: 'chip', riskScore: 0.14, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 13, timestamp: Date.now() - 165000 },
  { id: 'TXN-482928', accountId: 'ACCT-7724', merchant: 'Grab', amount: 18.50, currency: 'SGD', region: 'APAC', channel: 'mobile', riskScore: 0.09, riskLevel: 'low', status: 'cleared', flagged: false, latencyMs: 15, timestamp: Date.now() - 180000 },
];

const MOCK_ALERTS = [
  { id: 'ALT-7291', type: 'Velocity anomaly', severity: 'critical', accountId: 'ACCT-7291', description: 'Multiple rapid transactions detected — 5 transactions in 3 minutes', amount: 4892.00, region: 'NA', status: 'open', timestamp: Date.now() - 30000 },
  { id: 'ALT-5523', type: 'Amount anomaly', severity: 'critical', accountId: 'ACCT-5523', description: 'Transaction exceeds typical spend pattern by 840%', amount: 7500.00, region: 'APAC', status: 'open', timestamp: Date.now() - 60000 },
  { id: 'ALT-8814', type: 'Geographic anomaly', severity: 'high', accountId: 'ACCT-8814', description: 'ATM withdrawal in Frankfurt — last transaction was in London 45 min ago', amount: 2000.00, region: 'EU', status: 'investigating', timestamp: Date.now() - 90000 },
  { id: 'ALT-3190', type: 'Card-not-present', severity: 'high', accountId: 'ACCT-3190', description: 'High-risk merchant CNP transaction — anonymous gift card purchase', amount: 3200.00, region: 'NA', status: 'open', timestamp: Date.now() - 135000 },
  { id: 'ALT-4402', type: 'Account takeover attempt', severity: 'medium', accountId: 'ACCT-4402', description: 'Password reset followed by address change request', amount: 0, region: 'EU', status: 'resolved', timestamp: Date.now() - 240000 },
  { id: 'ALT-6103', type: 'Cross-border pattern', severity: 'medium', accountId: 'ACCT-6103', description: 'International transfers to 3 different countries in 24 hours', amount: 12500.00, region: 'APAC', status: 'investigating', timestamp: Date.now() - 360000 },
];

window.MOCK_TRANSACTIONS = MOCK_TRANSACTIONS;
window.MOCK_ALERTS = MOCK_ALERTS;
