using UnityEngine;
using System.Collections;

public abstract class MenuSection : MonoBehaviour
{
	[HideInInspector]
	public bool
		isActive = false;

	public abstract string Title {
		get;
	}

	private Animator animator;

	public virtual void Initialize ()
	{
		this.animator = this.GetComponent<Animator> ();
	}

	public virtual void OnBackPressed ()
	{
		MenuHelper.GoBack ();
	}

	public virtual void OnNavigatedTo (bool isForward)
	{
		if (animator != null) {
			if (isForward == true) {
				animator.SetTrigger ("navToForward");
			} else {
				animator.SetTrigger ("navToBackward");
			}
		}
	}

	public virtual void OnNavigatedFrom (bool isForward)
	{
		if (animator != null) {
			if (isForward == true) {
				animator.SetTrigger ("navFromForward");
			} else {
				animator.SetTrigger ("navFromBackward");
			}
		}
	}
}
