package HelloWorld.Button
{
	
	import flash.events.MouseEvent;
	
	import org.robotlegs.mvcs.Mediator;
	import HelloWorld.Events.HelloWorldMessageEvent;
	
	public class HelloButtonMediator extends Mediator
	{
		[inject]
		public var view:HelloButton;
		
		public function HelloButtonMediator()
		{
		}
		
		override public function onRegister():void
		{
			addViewListener(MouseEvent.CLICK, handleMouseClick);
		}
		
		public function handleMouseClick(Event:MouseEvent):void
		{
			dispatch(new HelloWorldMessageEvent(HelloWorldMessageEvent.MESSAGE_DISPATCHED, "Hello World"));
		}
			
	}
}