//= require <mootools-core-1.3-full-nocompat>
//= require <puremvc-mootools-port>
//= require <findsalons/ApplicationFacade>
//= require <findsalons/AsyncProxy>
var TopCenterColumnMediator = function()
{
	this.Extends = Mediator;
	/**
	 * The TopCenterColumn component intance in the page.
	 * 
	 * @type TopCenterColumn
	 */
	this.topCenterColumn = null;
	this.initialize = function(viewComponent)
	{
		this.parent(TopCenterColumnMediator.NAME, viewComponent /* TopCenterColumn */);
		this.topCenterColumn = viewComponent;
	};

	this.listNotificationInterests = function()
	{
		return [ ApplicationFacade.HASH_RETRIEVED, AsyncProxy.CONTENT_RECEIVED ];
	};

	this.onRegister = function()
	{
		this.facade.sendNotification(ApplicationFacade.RETRIEVE_CURRENT_HASH, null, TopCenterColumnMediator.NAME);
	};

	this.handleNotification = function(note /* Notification */)
	{
		switch (note.getName())
		{
			case ApplicationFacade.HASH_RETRIEVED:
				if (note.getType() == TopCenterColumnMediator.NAME)
					this.topCenterColumn.setInitializationState(note.getBody());
				break;

			case AsyncProxy.CONTENT_RECEIVED:
				this.topCenterColumn.setContent(note.getBody());
				break;
		}
	};
};
TopCenterColumnMediator = new Class(new TopCenterColumnMediator());
TopCenterColumnMediator.NAME = "TopCenterColumnMediator";
