/// 인벤토리 아이템 엔트리 (Inventory Entry)
class InventoryEntry {
  const InventoryEntry({required this.name, required this.count});

  final String name;
  final int count;

  InventoryEntry copyWith({String? name, int? count}) {
    return InventoryEntry(name: name ?? this.name, count: count ?? this.count);
  }
}

/// 인벤토리 (Inventory)
///
/// 골드와 아이템 목록을 관리
class Inventory {
  const Inventory({required this.gold, required this.items});

  final int gold;
  final List<InventoryEntry> items;

  /// 초기 골드 1000 지급 (캐릭터 생성 시)
  factory Inventory.empty() => const Inventory(gold: 1000, items: []);

  Inventory copyWith({int? gold, List<InventoryEntry>? items}) {
    return Inventory(gold: gold ?? this.gold, items: items ?? this.items);
  }
}
