import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:tangheem/models/authentication_user_model.dart';
import 'package:tangheem/models/content_info_model.dart';
import 'package:tangheem/models/navigation_model.dart';
import 'package:tangheem/models/surah_model.dart';

class AppState {
  static final AppState _instance = AppState._internal();

  AppState._internal();

  factory AppState() => _instance;

  SurahModel _surahModel;

  SurahModel get getSurahModel => _surahModel;

  void setSurahModel(SurahModel _surahModel) {
    this._surahModel = _surahModel;
  }

  ContentInfoDataModel _copyRight;

  ContentInfoDataModel get getContentInfoModel => _copyRight;

  void setContentInfoModel(ContentInfoDataModel _copyRight) {
    this._copyRight = _copyRight;
  }

  AuthenticationUserModel _authenticationUser;

  bool get isUserLogin => _authenticationUser != null;

  String get token => _authenticationUser?.result?.data?.token;

  String get userEmail => _authenticationUser?.result?.data?.email;

  void setAuthenticationModel(AuthenticationUserModel _authenticationUser) {
    this._authenticationUser = _authenticationUser;
  }

  NavigationModel _navigationModel;

  NavigationModel get getNavigationModel => _navigationModel;

  void setNavigationModel(NavigationModel _navigationModel) {
    this._navigationModel = _navigationModel;
  }

  FirebaseAnalytics _analytics;

  FirebaseAnalytics get getAnalytics => _analytics;

  void setAnalytics(FirebaseAnalytics _analytics) {
    this._analytics = _analytics;
  }
}
