import '../../../../core/constants/asset_paths.dart';

class AvatarConfig {
  final String gender;
  final int variant;
  final String selectedBackground;

  const AvatarConfig({
    this.gender = 'male',
    this.variant = 1,
    this.selectedBackground = 'bg_street_day',
  });

  factory AvatarConfig.fromJson(Map<String, dynamic> json) {
    return AvatarConfig(
      gender: json['gender'] ?? 'male',
      variant: json['variant'] ?? 1,
      selectedBackground: json['selected_background'] ?? 'bg_street_day',
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'gender': gender,
      'variant': variant,
      'selected_background': selectedBackground,
    };
  }

  String get assetPath => AssetPaths.getAvatarPath(gender, variant);
}
