/// Created by @Haoyi on 2021/4/13
///

part of "router.dart";

class Routes {
  static const canMuxDlg = "can_mux_dlg";

  static const String scheme = "https";
  static const String authority = "example";
  static const root = RoutePath("");
  static const settings = RoutePath("settings");
  static const debug = RoutePath("debug");
  static const dataDebug = RoutePath("dataDebug", parentPath: debug);
  static const adsDebug = RoutePath("adsDebug", parentPath: debug);
  static const testAds = RoutePath("testAds", parentPath: adsDebug);

  static RouteSettings buildAnonymous(
      {bool canShowBanner = false, Map<String, dynamic>? arguments}) {
    final Map<String, dynamic> args = {"canShowBanner": canShowBanner};
    if (arguments != null && arguments.isNotEmpty) {
      args.addAll(arguments);
    }
    return RouteSettings(name: IdUtils.uuidV4(), arguments: args);
  }

  // anonymous path
  // static String get anonymous => RouteUtils.anonymous;

  static int routeId = 0;
  static final List<RouteMatcher> matchers = [
    RouteMatcher(checker: (uri) {
      return uri.path == "" || uri.path == "/home" || uri.path == "/";
    }, dispatcher: (uri) async {
      return;
    }),
  ];
}
