// lib/pages/settings/settings_controller.dart

import 'package:get/get.dart';
import 'package:gifunavi/widgets/map_widget.dart';


class SettingsController extends GetxController {
  var timerDuration = const Duration(seconds: 10).obs;
  var autoReturnDisabled = false.obs;
  final MapResetController mapResetController = Get.put(MapResetController());

  void updateTimerDuration(int seconds) {
    timerDuration.value = Duration(seconds: seconds);
  }

  void setAutoReturnDisabled(bool value) {
    autoReturnDisabled.value = value;
    if (!value) {
      resetIdleTimer();
    }
  }

  void resetIdleTimer() {
    mapResetController.resetIdleTimer!();
  }
}
