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

    function WizardsListComponentViewModel(params, element) {
		
		this.base = new ACTComponent($(element), params);
	
		this.wizards = ko.observableArray([]);
		
		this.base.onRefresh = function(obj) {
			for (var i=0;i<obj.Wizards.length;i++) {
				this.base.addCallback(obj.Wizards[i], "click", "Started", [])
			}
			this.wizards(obj.Wizards);
		}.bind(this);
		
		this.base.initialize();
		params.ready(true);
		
    }
	
	return {
		createViewModel: function(params, componentInfo) {
            return new WizardsListComponentViewModel(params, componentInfo.element);
        }
	};
});

