/** Neighborhood scoring types shared across components */

import {
  GraduationCap,
  ShoppingBag,
  Stethoscope,
  TrainFront,
  Trees,
  UtensilsCrossed,
  type LucideIcon,
} from 'lucide-react';

export interface NeighborhoodCategory {
  category: string;
  label: string;
  score: number; // 0–10
  icon?: string;
}

export interface POIItem {
  id: string;
  name: string;
  category: POICategory;
  lat: number;
  lng: number;
  distance?: number; // meters from property
}

export type POICategory =
  | 'school'
  | 'hospital'
  | 'transit'
  | 'shopping'
  | 'restaurant'
  | 'park';

export interface NeighborhoodScoreData {
  overallScore: number;
  categories: NeighborhoodCategory[];
  pois: POIItem[];
  center: { lat: number; lng: number };
}

export const POI_CATEGORY_CONFIG: Record<
  POICategory,
  { label: string; color: string; icon: LucideIcon }
> = {
  school: { label: 'Trường học', color: '#3B82F6', icon: GraduationCap },
  hospital: { label: 'Bệnh viện', color: '#EF4444', icon: Stethoscope },
  transit: { label: 'Giao thông', color: '#8B5CF6', icon: TrainFront },
  shopping: { label: 'Mua sắm', color: '#F59E0B', icon: ShoppingBag },
  restaurant: { label: 'Nhà hàng', color: '#F97316', icon: UtensilsCrossed },
  park: { label: 'Công viên', color: '#22C55E', icon: Trees },
};

export const DEFAULT_CATEGORIES: NeighborhoodCategory[] = [
  { category: 'education', label: 'Giáo dục', score: 0 },
  { category: 'healthcare', label: 'Y tế', score: 0 },
  { category: 'transport', label: 'Giao thông', score: 0 },
  { category: 'shopping', label: 'Mua sắm', score: 0 },
  { category: 'dining', label: 'Ẩm thực', score: 0 },
  { category: 'environment', label: 'Môi trường', score: 0 },
];
