import 'dart:io';

import 'package:easy_localization/easy_localization.dart';

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

  AppState._internal();

  factory AppState() => _instance;

  bool isAuthenticated = false;

  set setIsAuthenticated(v) => isAuthenticated = v;

  bool isLogged = false;

  set setLogged(v) => isLogged = v;

  bool? get getIsLogged => isLogged;

  bool businessCardPrivilege = false;

  set setBusinessCardPrivilege(bool v) => businessCardPrivilege = v;

  bool? get getBusinessCardPrivilege => businessCardPrivilege;

  String? forgetPasswordTokenID;

  set setForgetPasswordTokenID(token) => forgetPasswordTokenID = token;

  String? get getForgetPasswordTokenID => forgetPasswordTokenID;

  //Wifi info
  String? _mohemmWifiSSID;

  set setMohemmWifiSSID(v) => _mohemmWifiSSID = v;

  String? get getMohemmWifiSSID => _mohemmWifiSSID;

  String? _mohemmWifiPassword;

  set setMohemmWifiPassword(v) => _mohemmWifiPassword = v;

  String? get getMohemmWifiPassword => _mohemmWifiPassword;

  bool isArabic(context) => EasyLocalization.of(context)?.locale.languageCode == "ar";

  int getLanguageID(context) => EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;

  String? _username;

  // todo ''sikander' added password for now, later will remove & improve
  String? password;

  set setUserName(v) => _username = v;

  String? get getUserName => _username;

  set setUserPassword(_password) => password = _password;

  int? workListIndex;

  set setWorkListIndex(int? _workListIndex) => workListIndex = _workListIndex;

  int? itgWorkListIndex;

  set setItgWorkListIndex(int? _itgWorkListIndex) => itgWorkListIndex = _itgWorkListIndex;

  String? _base64ImageEmp =
      "[encoded data, 53528 characters]";

  String? get getBase64ImageEmp => _base64ImageEmp;
}
