define(['ui/form/widget/widget', 'ui/form/widget/definitions', 'ui/form/widget/providers/checkBox', 'ui/form/widget/providers/comboBox', 'ui/form/widget/providers/hidden', 'ui/form/widget/providers/hiddenBox', 'ui/form/widget/providers/radioBox', 'ui/form/widget/providers/textArea', 'ui/form/widget/providers/textBox'], function (widgetFactory, widgetDefinitions, widgetCheckBoxProvider, widgetComboBoxProvider, widgetHiddenProvider, widgetHiddenBoxProvider, widgetRadioBoxProvider, widgetTextAreaProvider, widgetTextBoxProvider) { 'use strict';

	widgetFactory = widgetFactory && Object.prototype.hasOwnProperty.call(widgetFactory, 'default') ? widgetFactory['default'] : widgetFactory;
	widgetDefinitions = widgetDefinitions && Object.prototype.hasOwnProperty.call(widgetDefinitions, 'default') ? widgetDefinitions['default'] : widgetDefinitions;
	widgetCheckBoxProvider = widgetCheckBoxProvider && Object.prototype.hasOwnProperty.call(widgetCheckBoxProvider, 'default') ? widgetCheckBoxProvider['default'] : widgetCheckBoxProvider;
	widgetComboBoxProvider = widgetComboBoxProvider && Object.prototype.hasOwnProperty.call(widgetComboBoxProvider, 'default') ? widgetComboBoxProvider['default'] : widgetComboBoxProvider;
	widgetHiddenProvider = widgetHiddenProvider && Object.prototype.hasOwnProperty.call(widgetHiddenProvider, 'default') ? widgetHiddenProvider['default'] : widgetHiddenProvider;
	widgetHiddenBoxProvider = widgetHiddenBoxProvider && Object.prototype.hasOwnProperty.call(widgetHiddenBoxProvider, 'default') ? widgetHiddenBoxProvider['default'] : widgetHiddenBoxProvider;
	widgetRadioBoxProvider = widgetRadioBoxProvider && Object.prototype.hasOwnProperty.call(widgetRadioBoxProvider, 'default') ? widgetRadioBoxProvider['default'] : widgetRadioBoxProvider;
	widgetTextAreaProvider = widgetTextAreaProvider && Object.prototype.hasOwnProperty.call(widgetTextAreaProvider, 'default') ? widgetTextAreaProvider['default'] : widgetTextAreaProvider;
	widgetTextBoxProvider = widgetTextBoxProvider && Object.prototype.hasOwnProperty.call(widgetTextBoxProvider, 'default') ? widgetTextBoxProvider['default'] : widgetTextBoxProvider;

	/**
	 * This program is free software; you can redistribute it and/or
	 * modify it under the terms of the GNU General Public License
	 * as published by the Free Software Foundation; under version 2
	 * of the License (non-upgradable).
	 *
	 * This program is distributed in the hope that it will be useful,
	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 * GNU General Public License for more details.
	 *
	 * You should have received a copy of the GNU General Public License
	 * along with this program; if not, write to the Free Software
	 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
	 *
	 * Copyright (c) 2019 Open Assessment Technologies SA ;
	 */
	widgetFactory.registerProvider(widgetDefinitions.CHECKBOX, widgetCheckBoxProvider);
	widgetFactory.registerProvider(widgetDefinitions.COMBOBOX, widgetComboBoxProvider);
	widgetFactory.registerProvider(widgetDefinitions.HIDDEN, widgetHiddenProvider);
	widgetFactory.registerProvider(widgetDefinitions.HIDDENBOX, widgetHiddenBoxProvider);
	widgetFactory.registerProvider(widgetDefinitions.RADIOBOX, widgetRadioBoxProvider);
	widgetFactory.registerProvider(widgetDefinitions.TEXTAREA, widgetTextAreaProvider);
	widgetFactory.registerProvider(widgetDefinitions.TEXTBOX, widgetTextBoxProvider);

	return widgetFactory;

});
