class DialogueChoiceHubPrereqState extends PrereqState
{
}

class DialogueChoiceHubPrereq extends IScriptablePrereq
{
	private var m_isChoiceHubActive : Bool;

	protected override function Initialize( recordID : TweakDBID )
	{
		m_isChoiceHubActive = TweakDBInterface.GetBool( recordID + T".isChoiceHubActive", false );
	}

	public const override function IsFulfilled( game : GameInstance, context : IScriptable ) : Bool
	{
		var interactonsBlackboard : IBlackboard;
		var interactionData : UIInteractionsDef;
		var data : DialogChoiceHubs;
		var owner : weak< GameObject >;
		owner = ( ( GameObject )( context ) );
		interactonsBlackboard = GameInstance.GetBlackboardSystem( owner.GetGame() ).Get( GetAllBlackboardDefs().UIInteractions );
		interactionData = GetAllBlackboardDefs().UIInteractions;
		data = ( ( DialogChoiceHubs )( interactonsBlackboard.GetVariant( interactionData.DialogChoiceHubs ) ) );
		if( m_isChoiceHubActive )
		{
			if( data.choiceHubs.Size() > 0 )
			{
				return true;
			}
		}
		else
		{
			if( data.choiceHubs.Size() <= 0 )
			{
				return true;
			}
		}
		return false;
	}

}

