import 'package:flutter/material.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart' as mbx;

import 'app/app.dart';
import 'shared/auth/telegram_session.dart' as telegram_session;
import 'shared/runtime_config/runtime_config.dart' as runtime_config;

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  final mapboxAccessToken = runtime_config.mapboxAccessToken();
  if (mapboxAccessToken.isNotEmpty) {
    mbx.MapboxOptions.setAccessToken(mapboxAccessToken);
  }
  usePathUrlStrategy();
  telegram_session.configureTelegramWebApp();
  runApp(const MapflowApp());
}
