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_style_model.dart';

abstract class LoginBindPhoneState extends Equatable {
  const LoginBindPhoneState();

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

/// 初始化状态
class LoginBindPhoneInitial extends LoginBindPhoneState {}

/// 数据加载完毕状态
class LoginBindPhoneLoadedState extends LoginBindPhoneState {
  final LoginStyleModel model;

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

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

/// 数据加载出错状态
class LoginBindPhoneErrorState extends LoginBindPhoneState {}

/// 验证码下发成功的状态
class LoginBindPhoneGetVCodeSuccessState extends LoginBindPhoneState {}

/// 验证码下发失败的状态
class LoginBindPhoneGetVCodeErrorState extends LoginBindPhoneState {
  @override
  bool operator ==(Object other) {
    return false;
  }

  @override
  int get hashCode => super.hashCode;
}

/// 登陆成功
class LoginBindPhoneLoginSuccessState extends LoginBindPhoneState {
  final UserInfoModel model;

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

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

/// 登陆失败
class LoginBindPhoneLoginErrorState extends LoginBindPhoneState {
  @override
  bool operator ==(Object other) {
    return false;
  }

  @override
  int get hashCode => super.hashCode;
}
