import 'package:syncrow_web/utils/constants/strings_manager.dart';
import 'package:syncrow_web/utils/helpers/shared_preferences_helper.dart';

class ProjectManager {
  static Future<String?> getProjectUUID() async {
    final projectUuid = await SharedPreferencesHelper.readStringFromSP(
        StringsManager.projectKey);
    return projectUuid.isNotEmpty ? projectUuid : null;
  }

  static Future<void> setProjectUUID(String newUUID) async {
    await SharedPreferencesHelper.saveStringToSP(
        StringsManager.projectKey, newUUID);
  }

  static Future<void> clearProjectUUID() async {
    await SharedPreferencesHelper.removeValueFromSP(StringsManager.projectKey);
  }
}
