rjs.define([], function() {
	function BasicTextBox(id, defaultValue, styles, disabled) {
		const self = this;
		self.id = id;
		var viewHtml = 	`<input type="text" id="${self.id}" ${styles ? 'style="' + styles + '"' : ''} ${disabled === true ? 'disabled' : ''} />`;
		self.html = viewHtml;
		self.value = defaultValue;

		self.addedToCanvas = () => {
			$(`#${self.id}`).val(self.value);
			$(`#${self.id}`).change(function() {
				self.value = $(`#${self.id}`).val();
			});
		};

		self.enabled = (enabled) => {
			if (enabled) {
				$(`#${self.id}`).prop("readonly", false);
				$(`#${self.id}`).prop("disabled", false);
			}
			else {
				$(`#${self.id}`).prop("readonly", true);
				$(`#${self.id}`).prop("disabled", true);
			}
		};

		function getObjectById(id) { }

		self.getValue = () => self.value;
		self.hoverOn = () => {};
		self.hoverOff = () => {};
		self.select = () => {};
		self.deselect = () => {};
		self.handleKeyPress = (keyCode) => {};
	}
	return BasicTextBox;
});
