File size: 5,363 Bytes
5c876be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import type { VehicleType } from '../types/user';
import type { RideStatus } from '../types/ride';
import { colors } from '../theme';

// ─── App Identity ────────────────────────────────────────────────────────────
export const APP_NAME = 'Antaram';
export const APP_TAGLINE = 'Share rides, save the planet';

// ─── Default Location (Bangalore, India) ─────────────────────────────────────
export const DEFAULT_LOCATION = {
  lat: 12.9716,
  lng: 77.5946,
  address: 'Bangalore, Karnataka, India',
} as const;

// ─── Map Defaults ────────────────────────────────────────────────────────────
export const MAP_TILE_URL = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
export const MAP_TILE_ATTRIBUTION =
  '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
export const MAP_DEFAULT_ZOOM = 14;
export const MAP_MIN_ZOOM = 4;
export const MAP_MAX_ZOOM = 19;
export const MAP_INITIAL_DELTA = 0.01; // ~1km lat/lng span

// ─── Vehicle Types ───────────────────────────────────────────────────────────
export interface VehicleTypeInfo {
  type: VehicleType;
  label: string;
  icon: string;
  emoji: string;
  seats: number;
  baseFare: number;
  perKmRate: number;
}

export const VEHICLE_TYPES: VehicleTypeInfo[] = [
  {
    type: 'bike',
    label: 'Bike',
    icon: 'motorbike',
    emoji: '🏍️',
    seats: 1,
    baseFare: 10,
    perKmRate: 8,
  },
  {
    type: 'auto',
    label: 'Auto',
    icon: 'car-side',
    emoji: 'πŸ›Ί',
    seats: 3,
    baseFare: 20,
    perKmRate: 12,
  },
  {
    type: 'car',
    label: 'Car',
    icon: 'car',
    emoji: 'πŸš—',
    seats: 4,
    baseFare: 30,
    perKmRate: 15,
  },
];

// ─── Ride Status Colors ──────────────────────────────────────────────────────
export const RIDE_STATUS_COLORS: Record<RideStatus, string> = {
  draft: colors.neutral[400],
  active: colors.primary[500],
  matched: colors.secondary[500],
  ongoing: colors.tertiary[500],
  completed: colors.success,
  cancelled: colors.error,
};

export const RIDE_STATUS_LABELS: Record<RideStatus, string> = {
  draft: 'Draft',
  active: 'Active',
  matched: 'Matched',
  ongoing: 'On Ride',
  completed: 'Completed',
  cancelled: 'Cancelled',
};

// ─── Search & History Limits ─────────────────────────────────────────────────
export const MAX_SEARCH_HISTORY = 20;
export const MAX_SAVED_LOCATIONS = 30;
export const MAX_FRIEND_REQUESTS = 50;

// ─── SOS ─────────────────────────────────────────────────────────────────────
export const SOS_HOLD_DURATION = 3000; // ms to hold SOS button
export const SOS_CONTACTS_LIMIT = 5;

// ─── Notification Types ──────────────────────────────────────────────────────
export type NotificationType =
  | 'ride_matched'
  | 'ride_cancelled'
  | 'message'
  | 'friend_request'
  | 'friend_accepted'
  | 'ride_reminder'
  | 'system'
  | 'sos_alert';

export interface NotificationTypeInfo {
  type: NotificationType;
  label: string;
  icon: string;
  channel: string;
}

export const NOTIFICATION_TYPES: NotificationTypeInfo[] = [
  {
    type: 'ride_matched',
    label: 'Ride Matched',
    icon: 'handshake',
    channel: 'rides',
  },
  {
    type: 'ride_cancelled',
    label: 'Ride Cancelled',
    icon: 'close-circle',
    channel: 'rides',
  },
  {
    type: 'message',
    label: 'New Message',
    icon: 'chat',
    channel: 'messages',
  },
  {
    type: 'friend_request',
    label: 'Friend Request',
    icon: 'account-plus',
    channel: 'social',
  },
  {
    type: 'friend_accepted',
    label: 'Friend Accepted',
    icon: 'account-check',
    channel: 'social',
  },
  {
    type: 'ride_reminder',
    label: 'Ride Reminder',
    icon: 'bell-ring',
    channel: 'rides',
  },
  {
    type: 'system',
    label: 'System',
    icon: 'information',
    channel: 'system',
  },
  {
    type: 'sos_alert',
    label: 'SOS Alert',
    icon: 'alert',
    channel: 'sos',
  },
];

// ─── Misc ────────────────────────────────────────────────────────────────────
export const LOCATION_UPDATE_INTERVAL = 5000; // 5 seconds
export const LOCATION_UPDATE_DISTANCE = 10; // 10 meters
export const RATING_MIN = 1;
export const RATING_MAX = 5;
export const RATING_DEFAULT = 0;
export const MAX_SEATS_AVAILABLE = 4;
export const FARE_ESTIMATE_BUFFER = 0.15; // Β±15% variance for estimates