class BasicInteractionInterpreter extends IScriptable
{

	public static function Evaluate( isSecured : Bool, actions : array< DeviceAction >, allApplicableChoices : ref< array< InteractionChoice > >, onlyInteractableChoices : ref< array< InteractionChoice > > )
	{
		var choices : array< InteractionChoice >;
		var currentChoiceMetaData : ChoiceTypeWrapper;
		var i : Int32;
		for( i = 0; i < actions.Size(); i += 1 )
		{
			if( ( ( TogglePersonalLink )( actions[ i ] ) ) )
			{
				choices.PushBack( ( ( TogglePersonalLink )( actions[ i ] ) ).GetInteractionChoice() );
				actions.EraseFast( i );
				break;
			}
		}
		for( i = 0; i < actions.Size(); i += 1 )
		{
			if( ( ( ScriptableDeviceAction )( actions[ i ] ) ).IsQuickHack() || !( ( ( ScriptableDeviceAction )( actions[ i ] ) ).IsInteractionChoiceValid() ) )
			{
				continue;
			}
			choices.PushBack( ( ( ScriptableDeviceAction )( actions[ i ] ) ).GetInteractionChoice() );
		}
		allApplicableChoices = choices;
		for( i = 0; i < allApplicableChoices.Size(); i += 1 )
		{
			currentChoiceMetaData = allApplicableChoices[ i ].choiceMetaData.type;
			if( ChoiceTypeWrapper.IsType( currentChoiceMetaData, gameinteractionsChoiceType.Inactive ) || ( allApplicableChoices[ i ].data.Size() == 0 ) )
			{
				continue;
			}
			else
			{
				if( allApplicableChoices[ i ].choiceMetaData.tweakDBName != "" || TDBID.IsValid( allApplicableChoices[ i ].choiceMetaData.tweakDBID ) )
				{
					onlyInteractableChoices.PushBack( allApplicableChoices[ i ] );
				}
			}
		}
	}

}

