class RipperdocCategoryTooltip extends AGenericTooltipController
{
	private editable var m_desc : inkTextRef;
	private editable var m_availableLabelCounter : inkTextRef;
	private editable var m_ownedLabelCounter : inkTextRef;
	private editable var m_ownedLabel : inkWidgetRef;
	private editable var m_availableLabel : inkWidgetRef;
	private editable var m_NALabel : inkWidgetRef;

	public override function SetData( tooltipData : ATooltipData )
	{
		var data : RipperdocCategoryTooltipData;
		data = ( ( RipperdocCategoryTooltipData )( tooltipData ) );
		inkWidgetRef.SetVisible( m_ownedLabel, ( data.ownedItems > 0 ) && data.screenType == CyberwareScreenType.Inventory );
		inkWidgetRef.SetVisible( m_availableLabel, ( data.availableItems > 0 ) && data.screenType == CyberwareScreenType.Ripperdoc );
		inkWidgetRef.SetVisible( m_NALabel, ( data.availableItems == 0 ) && ( data.ownedItems == 0 ) );
		inkTextRef.SetText( m_availableLabelCounter, IntToString( data.availableItems ) );
		inkTextRef.SetText( m_ownedLabelCounter, IntToString( data.ownedItems ) );
		inkTextRef.SetText( m_desc, GetLocalizedText( GetCategoryLockey( data.category ) ) );
	}

	private function GetCategoryLockey( category : gamedataEquipmentArea ) : String
	{
		switch( category )
		{
			case gamedataEquipmentArea.EyesCW:
				return "LocKey#93189";
			case gamedataEquipmentArea.SystemReplacementCW:
				return "LocKey#93196";
			case gamedataEquipmentArea.ArmsCW:
				return "LocKey#93187";
			case gamedataEquipmentArea.HandsCW:
				return "LocKey#93191";
			case gamedataEquipmentArea.LegsCW:
				return "LocKey#93194";
			case gamedataEquipmentArea.FrontalCortexCW:
				return "LocKey#93190";
			case gamedataEquipmentArea.NervousSystemCW:
				return "LocKey#93195";
			case gamedataEquipmentArea.IntegumentarySystemCW:
				return "LocKey#93192";
			case gamedataEquipmentArea.MusculoskeletalSystemCW:
				return "LocKey#93193";
			case gamedataEquipmentArea.CardiovascularSystemCW:
				return "LocKey#93188";
			default:
				return "LocKey#93188";
		}
	}

}

class RipperdocCategoryTooltipData extends ATooltipData
{
	var category : gamedataEquipmentArea;
	var ownedItems : Int32;
	var availableItems : Int32;
	var screenType : CyberwareScreenType;
}

