-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtypes.ts
More file actions
46 lines (42 loc) · 1.09 KB
/
types.ts
File metadata and controls
46 lines (42 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
export interface Incident {
id: string;
type: 'Kidnapping' | 'Banditry' | 'Accident' | 'Checkpoint' | 'Safe Haven' | 'Terrorism';
location: string;
coordinates: [number, number]; // [lat, lng]
description: string;
timestamp: string;
timestampMs?: number; // Added for precise sorting
verified: boolean;
severity: 'low' | 'medium' | 'high' | 'critical';
source?: string;
votes: number;
sourceUrl?: string;
}
export interface Route {
id: string;
name: string;
start: string;
end: string;
riskLevel: 'Safe' | 'Caution' | 'High Risk' | 'Critical';
avgSpeed: string;
activeIncidents: number;
coordinates: [number, number][]; // Array of points for polyline
}
export interface SecurityTip {
id: string;
title: string;
content: string;
fullContent?: string; // Pre-generated content for instant load
category: 'Prevention' | 'Emergency' | 'Cyber' | 'Travel';
}
export enum AppView {
DASHBOARD = 'dashboard',
MAP = 'map',
REPORTS = 'reports',
COMMUNITY = 'community'
}
export interface ChatMessage {
role: 'user' | 'model';
text: string;
timestamp: number;
}