import 'package:equatable/equatable.dart';
import 'package:flutter/cupertino.dart';
import 'package:zhiying_comm/models/user/user_info_model.dart';
import 'package:zhiying_comm/pages/login_page/model/login_model.dart';

abstract class LoginAccountState extends Equatable {
  const LoginAccountState();

  @override
  List<Object> get props => [];
}

/// 初始化状态
class LoginAccountInitial extends LoginAccountState {}

/// 数据加载完毕状态
class LoginAccountLoadedState extends LoginAccountState {
  final LoginModel model;

  const LoginAccountLoadedState({@required this.model});

  @override
  List<Object> get props => [this.model];
}

/// 数据加载出错状态
class LoginAccountErrorState extends LoginAccountState {}

/// 验证码下发成功的状态
class LoginAccountGetVcodeSuccessState extends LoginAccountState {
  final String msg;

  const LoginAccountGetVcodeSuccessState({this.msg});

  @override
  List<Object> get props => [this.msg];
}

/// 验证码下发失败的状态
class LoginAccountGetVcodeErrorState extends LoginAccountState {
  final String msg;

  const LoginAccountGetVcodeErrorState({this.msg});
}

/// 验证码登陆成功
class LoginAccountTypeVcodeLoginSuccessState extends LoginAccountState {
  final UserInfoModel model;

  const LoginAccountTypeVcodeLoginSuccessState({@required this.model});

  @override
  List<Object> get props => [this.model];
}

/// 验证码登陆失败
class LoginAccountTypeVcodeLoginErrorState extends LoginAccountState {
  final String msg;

  const LoginAccountTypeVcodeLoginErrorState({this.msg});
}
