import 'package:get/get.dart';

///授权页面状态
class AuthBoardState {
  ///路由验证
  static bool hasRoutePass = false;
  final RxBool _isSwitchAuthBody = RxBool(false);
  final RxString _qrCode = RxString('');
  final RxBool _expiredQRCode = RxBool(false);
  final Rx<int> _currentIndex = Rx(0);

  ///二维码是否过期
  bool get expiredQRCode => _expiredQRCode.value;
  set expiredQRCode(bool v) => _expiredQRCode.value = v;

  ///获取当前索引
  int get currentIndex => _currentIndex.value;

  ///设置当前索引
  set currentIndex(int val) => _currentIndex(val);

  ///是否切换为二维码登录
  bool get isSwitchAuthBody => _isSwitchAuthBody.value;
  set isSwitchAuthBody(bool val) => _isSwitchAuthBody.value = val;

  ///二维码唯Code
  String get qrCode => _qrCode.value;
  set qrCode(String v) => _qrCode.value = v;
}
