import 'login_status.dart';
import 'otp_status.dart';
import 'profile_status.dart';

class AuthState {
  final String mobile; // شماره‌ی در حال احراز (برای صفحه‌ی کد)
  final LoginStatus loginStatus;
  final OtpStatus otpStatus;
  final ProfileStatus profileStatus;

  AuthState({
    required this.mobile,
    required this.loginStatus,
    required this.otpStatus,
    required this.profileStatus,
  });

  factory AuthState.initial() => AuthState(
        mobile: '',
        loginStatus: LoginInitial(),
        otpStatus: OtpInitial(),
        profileStatus: ProfileInitial(),
      );

  AuthState copyWith({
    String? mobile,
    LoginStatus? loginStatus,
    OtpStatus? otpStatus,
    ProfileStatus? profileStatus,
  }) =>
      AuthState(
        mobile: mobile ?? this.mobile,
        loginStatus: loginStatus ?? this.loginStatus,
        otpStatus: otpStatus ?? this.otpStatus,
        profileStatus: profileStatus ?? this.profileStatus,
      );
}
