class UserProfile {
  final String firstName;
  final String lastName;
  final String email;

  const UserProfile({
    required this.firstName,
    required this.lastName,
    required this.email,
  });

  String get fullName => '$firstName $lastName';

  factory UserProfile.fromJwtClaims(Map<String, dynamic> claims) {
    return UserProfile(
      firstName: claims['given_name'] as String? ?? '',
      lastName: claims['family_name'] as String? ?? '',
      email: claims['email'] as String? ?? '',
    );
  }

  @override
  String toString() => 'UserProfile(firstName: $firstName, lastName: $lastName, email: $email)';
}
