| import type { VehicleType } from '../types/user'; |
| import type { RideStatus } from '../types/ride'; |
| import { colors } from '../theme'; |
|
|
| |
| export const APP_NAME = 'Antaram'; |
| export const APP_TAGLINE = 'Share rides, save the planet'; |
|
|
| |
| export const DEFAULT_LOCATION = { |
| lat: 12.9716, |
| lng: 77.5946, |
| address: 'Bangalore, Karnataka, India', |
| } as const; |
|
|
| |
| export const MAP_TILE_URL = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'; |
| export const MAP_TILE_ATTRIBUTION = |
| '© <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; |
|
|
| |
| 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, |
| }, |
| ]; |
|
|
| |
| 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', |
| }; |
|
|
| |
| export const MAX_SEARCH_HISTORY = 20; |
| export const MAX_SAVED_LOCATIONS = 30; |
| export const MAX_FRIEND_REQUESTS = 50; |
|
|
| |
| export const SOS_HOLD_DURATION = 3000; |
| export const SOS_CONTACTS_LIMIT = 5; |
|
|
| |
| 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', |
| }, |
| ]; |
|
|
| |
| export const LOCATION_UPDATE_INTERVAL = 5000; |
| export const LOCATION_UPDATE_DISTANCE = 10; |
| 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; |
|
|