export type TrackPointEvent = 'LOCATION_ADDED' | 'VISIT_RECORDED' | 'SESSION_STARTED' | 'SESSION_ENDED';

export interface TrackPointPayload {
  latitude: number;
  longitude: number;
  accuracy?: number;
  recordedAt: string;
  eventType?: TrackPointEvent;
}

export interface LiveVolunteer {
  userId: string;
  name: string | null;
  email: string;
  latitude: number;
  longitude: number;
  lastRecordedAt: string;
  recentTrail: [number, number][];
  canvassSessionId: string | null;
  trackingSessionId: string;
}

export interface TrackingSessionSummary {
  id: string;
  userId: string;
  userName: string | null;
  userEmail: string;
  startedAt: string;
  endedAt: string | null;
  totalPoints: number;
  totalDistanceM: number;
  canvassSessionId: string | null;
  isActive: boolean;
}

export interface SessionRoute {
  coordinates: [number, number][];
  events: {
    latitude: number;
    longitude: number;
    eventType: TrackPointEvent;
    recordedAt: string;
  }[];
  totalPoints: number;
}
