define(['scripts/knockout-3.3.0','scripts/ACTComponent.js'], function(ko, ACTComponent) {

	function TitleComponentViewModel(params, element) {
		this.base = new ACTComponent($(element), params);
		this.title = ko.observable('');
		this.subtitle = ko.observable('_');
		this.icon = ko.observable('');

		this.base.onRefresh = function(obj) {
			this.title(obj.Title);
			this.subtitle(obj.SubTitle);
			this.icon(obj.Icon);
		}.bind(this);

		this.base.initialize();
		params.ready(true);
	}

	return {
		createViewModel: function(params, componentInfo) {
			return new TitleComponentViewModel(params, componentInfo.element);
		}
	};

});

