import React from "react";
import { POIs, Scores } from "@local-logic/client";
import BusSVG from "../assets/icons/directions_bus.svg";
import CarSVG from "../assets/icons/directions_car.svg";
import WalkSVG from "../assets/icons/directions_walk.svg";
import BikeSVG from "../assets/icons/directions_bike.svg";
import CelebrationSVG from "../assets/icons/celebration.svg";
import HearingSVG from "../assets/icons/hearing.svg";
import CafeSVG from "../assets/icons/local_cafe.svg";
import MallSVG from "../assets/icons/local_mall.svg";
import NightlifeSVG from "../assets/icons/nightlife.svg";
import RestaurantSVG from "../assets/icons/restaurant.svg";
import ShoppingBasketSVG from "../assets/icons/shopping_basket.svg";
import NatureSVG from "../assets/icons/nature.svg";
import ForestSVG from "../assets/icons/forest.svg";
import StrollerSVG from "../assets/icons/stroller.svg";
import SpaSVG from "../assets/icons/spa.svg";
import SchoolSVG from "../assets/icons/school.svg";
import ChildCareSVG from "../assets/icons/child_care.svg";
import CastleSVG from "../assets/icons/castle.svg";

export const scoreIcons: Record<keyof Scores["location"], React.FC> = {
  // Commute
  pedestrian_friendly: WalkSVG,
  transit_friendly: BusSVG,
  cycling_friendly: BikeSVG,
  car_friendly: CarSVG,

  // Amenities
  groceries: ShoppingBasketSVG,
  restaurants: RestaurantSVG,
  cafes: CafeSVG,
  shopping: MallSVG,

  // Nature
  parks: NatureSVG,
  greenery: ForestSVG,

  // Character
  vibrant: CelebrationSVG,
  nightlife: NightlifeSVG,
  quiet: HearingSVG,
  historic: CastleSVG,

  // Education
  high_schools: SchoolSVG,
  primary_schools: ChildCareSVG,
  daycares: StrollerSVG,

  // Wellness
  wellness: SpaSVG,
};

export const scorePois: Partial<
  Record<keyof Scores["location"], (keyof POIs)[]>
> = {
  // Commute
  pedestrian_friendly: [],
  transit_friendly: ["rapid_transit_stations", "train_stations", "bus_stops"],
  cycling_friendly: [],
  car_friendly: ["car_fueling_stations"],

  // Amenities
  groceries: ["groceries", "groceries_specialized"],
  restaurants: ["restaurants", "healthy_restaurants"],
  cafes: ["cafes"],
  shopping: ["shopping"],

  // Nature
  parks: ["parks"],
  greenery: [],

  // Character
  vibrant: ["art_culture_science"],
  nightlife: ["nightlife"],
  quiet: [],
  historic: [],

  // Education
  high_schools: [],
  primary_schools: [],
  daycares: ["daycares"],

  // Wellness
  wellness: [
    "fitness",
    "healthy_restaurants",
    "health_care",
    "groceries",
    "sport_facilities",
    "parks",
  ],
};
