import "dart:io";

import "utils.dart";

class OcctRoutesParser extends Parser<RouteID, Route> {
  final routesFile = File(occtDataDir / "routes.json");
  static final routesToSkip = {5};

  @override
  Future<Map<RouteID, Route>> parse() async => {
    for (final routeJson in await readJson(routesFile))
      if (!routesToSkip.contains(routeJson["id"]))
        RouteID(Provider.occt, routeJson["id"]): Route.fromOcctJson(routeJson),
  };
}
