/// یک قابِ آواتار (کازمتیک). owned یعنی قابلِ انتخاب.
class AvatarFrame {
  final String id;
  final String title;
  final int priceCoins;
  final bool vip;
  final String c1; // رنگِ گرادیان (hex بدونِ #)؛ خالی ⇒ قابِ رتبه
  final String c2;
  final bool owned;

  const AvatarFrame({
    required this.id,
    required this.title,
    required this.priceCoins,
    required this.vip,
    required this.c1,
    required this.c2,
    required this.owned,
  });

  factory AvatarFrame.fromJson(Map<String, dynamic> j) => AvatarFrame(
        id: (j['id'] ?? '') as String,
        title: (j['title'] ?? '') as String,
        priceCoins: (j['price_coins'] ?? 0) as int,
        vip: (j['vip'] ?? false) as bool,
        c1: (j['c1'] ?? '') as String,
        c2: (j['c2'] ?? '') as String,
        owned: (j['owned'] ?? false) as bool,
      );
}

/// کاتالوگِ قاب‌ها + قابِ انتخابیِ کاربر.
class FrameCatalog {
  final List<AvatarFrame> frames;
  final String selected;
  const FrameCatalog({required this.frames, required this.selected});
}
