class ShoppingCartListItem extends inkLogicController
{
	private editable var m_label : inkTextRef;
	private editable var m_quantity : inkTextRef;
	private editable var m_value : inkTextRef;
	private editable var m_removeBtn : inkWidgetRef;
	private var m_data : InventoryItemData;

	protected event OnInitialize()
	{
		inkWidgetRef.SetVisible( m_removeBtn, false );
	}

	protected event OnUninitialize() {}

	public function SetupData( const data : ref< InventoryItemData > )
	{
		m_data = data;
		inkTextRef.SetText( m_label, InventoryItemData.GetName( data ) );
		inkTextRef.SetText( m_quantity, ( ( String )( InventoryItemData.GetQuantity( data ) ) ) );
	}

	public function OnHoverOver()
	{
		inkWidgetRef.SetVisible( m_removeBtn, true );
	}

	public function OnHoverOut()
	{
		inkWidgetRef.SetVisible( m_removeBtn, false );
	}

	public function GetData() : InventoryItemData
	{
		return m_data;
	}

}

