import 'package:get/get.dart';

abstract class BaseSettingsController extends GetxController {
  final RxBool isLoading = false.obs;
  final RxString errorMessage = ''.obs;

  // Method to handle loading state
  void setLoading(bool loading) {
    isLoading.value = loading;
  }

  // Method to handle errors
  void setError(String message) {
    errorMessage.value = message;
  }

  // Method to clear errors
  void clearError() {
    errorMessage.value = '';
  }

  // Save settings to storage (to be implemented by subclasses)
  Future<bool> saveSettings();

  // Load settings from storage (to be implemented by subclasses)
  Future<void> loadSettings();
}
