import 'package:get/get.dart';
import 'package:sigap/src/features/personalization/data/repositories/officers_repository.dart';
import 'package:sigap/src/features/personalization/data/repositories/profile_repository.dart';
import 'package:sigap/src/features/personalization/data/repositories/users_repository.dart';
import 'package:sigap/src/features/personalization/presentasion/controllers/profile/officer_profile_controller.dart';
import 'package:sigap/src/features/personalization/presentasion/controllers/profile/profile_controller.dart';

class ProfileBinding extends Bindings {
  @override
  void dependencies() {
    // Register repositories if they aren't already
    if (!Get.isRegistered<UserRepository>()) {
      Get.lazyPut(() => UserRepository());
    }

    if (!Get.isRegistered<ProfileRepository>()) {
      Get.lazyPut(() => ProfileRepository());
    }

    if (!Get.isRegistered<OfficerRepository>()) {
      Get.lazyPut(() => OfficerRepository());
    }

    // Register controllers
    Get.lazyPut(() => ProfileController(), fenix: true);
    Get.lazyPut(() => OfficerController(), fenix: true);
  }
}
