import 'package:get/get.dart';

import 'map_socket_controller.dart';
import 'map_engine_controller.dart';
import 'location_search_controller.dart';
import 'nearby_drivers_controller.dart';
import 'ride_lifecycle_controller.dart';
import 'ui_interactions_controller.dart';

class MapScreenBinding extends Bindings {
  @override
  void dependencies() {
    // 1. WebSocket Controller: Permanent and immediate
    Get.put(MapSocketController());

    // 2. Core Controllers (initialized when the screen opens or on demand)
    Get.lazyPut(() => MapEngineController());
    Get.lazyPut(() => LocationSearchController());
    Get.lazyPut(() => NearbyDriversController());

    // 3. Lifecycle and UI Interaction Controllers
    Get.lazyPut(() => RideLifecycleController());
    Get.lazyPut(() => UiInteractionsController(), fenix: true);
  }
}
