import enum gameWardrobeClothingSetIndex
{
	Slot1,
	Slot2,
	Slot3,
	Slot4,
	Slot5,
	Slot6,
	Slot7,
	COUNT,
	INVALID,
}

importonly abstract class IWardrobeSystem extends IGameSystem
{
}

import final abstract class WardrobeSystem extends IWardrobeSystem
{
	public import function GetStoredItemID( item : TweakDBID ) : ItemID;
	public import function StoreUniqueItemID( itemID : ItemID ) : Bool;
	public import function GetStoredItemIDs() : array< ItemID >;
	public import function GetFilteredStoredItemIDs( equipmentArea : gamedataEquipmentArea ) : array< ItemID >;
	public import function GetFilteredInventoryItemsData( equipmentArea : gamedataEquipmentArea, inventoryItemDataV2 : IScriptable ) : array< InventoryItemData >;
	public import function IsItemBlacklisted( itemID : ItemID ) : Bool;
	public import function PushBackClothingSet( clothingSet : ClothingSet );
	public import function DeleteClothingSet( setIndex : gameWardrobeClothingSetIndex );
	public import function GetClothingSets() : array< ClothingSet >;
	public import function SetActiveClothingSetIndex( slotIndex : gameWardrobeClothingSetIndex );
	public import function GetActiveClothingSetIndex() : gameWardrobeClothingSetIndex;
	public import function GetActiveClothingSet() : ClothingSet;

	public function StoreUniqueItemIDAndMarkNew( gameInstance : GameInstance, itemID : ItemID ) : Bool
	{
		var success : Bool;
		success = StoreUniqueItemID( itemID );
		if( success )
		{
			WardrobeSystem.SendWardrobeAddItemRequest( gameInstance, itemID );
		}
		return success;
	}

	public static function WardrobeClothingSetIndexToNumber( slotIndex : gameWardrobeClothingSetIndex ) : Int32
	{
		switch( slotIndex )
		{
			case gameWardrobeClothingSetIndex.Slot1:
				return 0;
			case gameWardrobeClothingSetIndex.Slot2:
				return 1;
			case gameWardrobeClothingSetIndex.Slot3:
				return 2;
			case gameWardrobeClothingSetIndex.Slot4:
				return 3;
			case gameWardrobeClothingSetIndex.Slot5:
				return 4;
			case gameWardrobeClothingSetIndex.Slot6:
				return 5;
			case gameWardrobeClothingSetIndex.Slot7:
				return 6;
			default:
				return -1;
		}
		return -1;
	}

	public static function NumberToWardrobeClothingSetIndex( number : Int32 ) : gameWardrobeClothingSetIndex
	{
		switch( number )
		{
			case 0:
				return gameWardrobeClothingSetIndex.Slot1;
			case 1:
				return gameWardrobeClothingSetIndex.Slot2;
			case 2:
				return gameWardrobeClothingSetIndex.Slot3;
			case 3:
				return gameWardrobeClothingSetIndex.Slot4;
			case 4:
				return gameWardrobeClothingSetIndex.Slot5;
			case 5:
				return gameWardrobeClothingSetIndex.Slot6;
			case 6:
				return gameWardrobeClothingSetIndex.Slot7;
			default:
				return gameWardrobeClothingSetIndex.INVALID;
		}
		return gameWardrobeClothingSetIndex.INVALID;
	}

	public static function SendWardrobeAddItemRequest( gameInstance : GameInstance, itemID : ItemID )
	{
		var request : UIScriptableSystemWardrobeAddItem;
		request = new UIScriptableSystemWardrobeAddItem;
		request.itemID = itemID;
		UIScriptableSystem.GetInstance( gameInstance ).QueueRequest( request );
	}

	public static function SendWardrobeInspectItemRequest( gameInstance : GameInstance, itemID : ItemID )
	{
		var request : UIScriptableSystemWardrobeInspectItem;
		request = new UIScriptableSystemWardrobeInspectItem;
		request.itemID = itemID;
		UIScriptableSystem.GetInstance( gameInstance ).QueueRequest( request );
	}

}

