// Provider-neutral mapping types. Pages import only these and <JobMap>;
// swapping Google for Esri later means adding a new provider implementation
// of JobMapProps under components/map/esri/ and switching the dispatcher.

export interface MapPoint {
  id: string;
  lat: number;
  lng: number;
  utilityType: string;
  fixType: string;
  depth: number | null;
  sequence: number | null;
  recordedAt: string;
}

export interface JobMapProps {
  points: MapPoint[];
  // Pan/zoom to fit all points whenever their count changes
  fitBounds?: boolean;
  heightPx?: number;
}

// APWA uniform color code for marking underground utilities
export const UTILITY_COLORS: Record<string, string> = {
  ELECTRIC: '#d32f2f', // red
  GAS: '#fbc02d', // yellow
  WATER: '#1976d2', // blue
  SEWER: '#388e3c', // green
  TELECOM: '#f57c00', // orange
  CATV: '#f57c00', // orange
  FIBER: '#f57c00', // orange
  STEAM: '#fbc02d', // yellow
  UNKNOWN: '#e91e8c', // pink (unknown/proposed)
};
