import 'package:equatable/equatable.dart';

class LoginState extends Equatable {
  final bool rememberPassword;
  final bool isLoading;
  final String? savedUsername;
  final String? savedPassword;

  const LoginState({
    this.rememberPassword = false,
    this.isLoading = false,
    this.savedUsername,
    this.savedPassword,
  });

  LoginState copyWith({
    bool? rememberPassword,
    bool? isLoading,
    String? savedUsername,
    String? savedPassword,
  }) {
    return LoginState(
      rememberPassword: rememberPassword ?? this.rememberPassword,
      isLoading: isLoading ?? this.isLoading,
      savedUsername: savedUsername ?? this.savedUsername,
      savedPassword: savedPassword ?? this.savedPassword,
    );
  }

  @override
  List<Object?> get props => [
        rememberPassword,
        isLoading,
        savedUsername,
        savedPassword,
      ];
}