//  @import com.hedgehoglab.application.controller.BaseController;
//  @import com.hedgehoglab.collection.LinkedList;
//	@import com.hedgehoglab.application.helper.BaseHelper;
/**
 *
 * @param scope
 */
function ContactsNewController(scope){
	BaseHelper.call(this,scope);
	
	var _this=this;
	scope.contact_new_view.subscribe_to('on_new_contact_clicked',function(event){
		scope.licence_service.can_add_contacts(function(can_add_contacts,check){
//			scope.contact_new_view.disable_actions(!licence_valid);
			if(can_add_contacts){
				scope.selected_contacts_model.model([-1]);
			}else{
				//
				//feedback.contacts.index.importlicencefail
				var message = _this.resource_string("feedback.contacts.index.addlicencefail");
			    scope.message_service.show_message({
			        message: message,
			        type: "info"
			    });
			}
		});
		
	});
	
	//	Ask the licence service if we have a valid licence
	scope.licence_service.can_add_contacts(function(can_add_contacts,check){
		// scope.contact_new_view.disable_actions(!licence_valid);
	});
};

