'use strict';
var ServiceRegistry = require('caplin/core/ServiceRegistry');
var PresentationModel = require('caplin/presenter/PresentationModel');
var topiarist = require('topiarist');
var Property = require('caplin/presenter/property/Property');

function ExampleClass() {
	this.message = new Property('Hello World!');
}

topiarist.extend(ExampleClass, PresentationModel);

ExampleClass.prototype.buttonClicked = function() {
	var proxy = ServiceRegistry
					.getService('caplin.event-service')
					.getProxy('caplin.workbench.model.WorkbenchEventListener', 'caplin');

	proxy.logEvent('button clicked', '', {
		'greeting': 'Hello!'
	});
};

module.exports = ExampleClass;
