/// DTO representing a failes login attempt request for 2fa token.
class TokenRequiredDto {
  final bool? tokenRequired;
  final bool? tokenInValid;

  TokenRequiredDto({
    required this.tokenRequired,
    required this.tokenInValid,
  });

  /// Create from JSON response
  factory TokenRequiredDto.fromJson(Map<String, dynamic> json) {
    return TokenRequiredDto(
      tokenRequired: json['tokenRequired'] as bool,
      tokenInValid: json['tokenInValid'] as bool,
    );
  }
}

/// DTO representing a pair of JWT tokens from the backend.
class JwtTokenPairDto {
  final String accessToken;
  final String refreshToken;

  JwtTokenPairDto({
    required this.accessToken,
    required this.refreshToken,
  });

  /// Create from JSON response
  factory JwtTokenPairDto.fromJson(Map<String, dynamic> json) {
    return JwtTokenPairDto(
      accessToken: json['accessToken'] as String,
      refreshToken: json['refreshToken'] as String,
    );
  }

  /// Convert to JSON (for serialization if needed)
  Map<String, dynamic> toJson() {
    return {
      'accessToken': accessToken,
      'refreshToken': refreshToken,
    };
  }

  @override
  String toString() {
    return 'JwtTokenPairDto{accessToken: [REDACTED], refreshToken: [REDACTED]}';
  }
}
