class CustomQuestNotificationGameController extends inkHUDGameController
{
	private editable var m_label : inkTextRef;
	private editable var m_desc : inkTextRef;
	private editable var m_icon : inkImageRef;
	private editable var m_fluffHeader : inkTextRef;
	private var m_root : weak< inkWidget >;
	private var m_data : CustomQuestNotificationUserData;
	private var m_animationProxy : inkAnimProxy;

	protected event OnInitialize()
	{
		m_data = ( ( CustomQuestNotificationUserData )( GetRootWidget().GetUserData( 'CustomQuestNotificationUserData' ) ) );
		Setup();
	}

	private function Setup()
	{
		inkTextRef.SetText( m_label, m_data.data.header );
		inkTextRef.SetText( m_desc, m_data.data.desc );
		if( m_data.data.icon != '' )
		{
			inkImageRef.SetVisible( m_icon, true );
			inkImageRef.SetTexturePart( m_icon, m_data.data.icon );
		}
		else
		{
			inkImageRef.SetVisible( m_icon, false );
		}
		if( m_data.data.fluffHeader != "" )
		{
			inkTextRef.SetText( m_fluffHeader, m_data.data.fluffHeader );
		}
		else
		{
			inkTextRef.SetText( m_fluffHeader, GetLocalizedText( "UI-ResourceExports-Message" ) );
		}
		PlayAnimation( 'outro_safe' );
	}

	private function PlayAnimation( animName : CName )
	{
		m_root.SetVisible( true );
		m_animationProxy = PlayLibraryAnimation( animName );
		m_animationProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnOutroAnimFinished' );
	}

	protected event OnOutroAnimFinished( anim : inkAnimProxy )
	{
		m_root.SetVisible( false );
	}

}

importonly struct CustomQuestNotificationData
{
	import var header : String;
	import var desc : String;
	import var icon : CName;
	import var fluffHeader : String;
}

