import type { Restaurant } from "@/lib/api";

export interface MapBounds {
  north: number;
  south: number;
  east: number;
  west: number;
}

export interface FlyTo {
  lat: number;
  lng: number;
  zoom?: number;
}

export interface MapViewProps {
  restaurants: Restaurant[];
  selected?: Restaurant | null;
  onSelectRestaurant?: (r: Restaurant) => void;
  onBoundsChanged?: (bounds: MapBounds) => void;
  flyTo?: FlyTo | null;
  onMyLocation?: () => void;
  activeChannel?: string;
}

// 좌표가 한국 영토 bbox 안인지 (WGS84).
export function isKoreaCoord(lat: number, lng: number): boolean {
  return lat >= 33 && lat <= 38.7 && lng >= 124 && lng <= 132;
}
