var wijmo;define(["./wijmo.widget"],function(){var e=this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);r.prototype=t.prototype,e.prototype=new r};(function(t){(function(n){var r=jQuery,i="wijtextbox",s=function(t){function n(){t.apply(this,arguments)}return e(n,t),n.prototype._create=function(){var e=this,n=e.element,i=e.options.wijCSS,s={input:!0,textarea:!0},o={text:!0,password:!0,email:!0,url:!0},u=n.get(0).nodeName.toLowerCase(),a=n.attr("type");window.wijmoApplyWijTouchUtilEvents&&(r=window.wijmoApplyWijTouchUtilEvents(r));if(!s.hasOwnProperty(u))return;if(u==="input"&&a&&!o.hasOwnProperty(a.toLowerCase()))return;n.addClass(i.wijtextbox).addClass(i.widget).addClass(i.stateDefault).addClass(i.cornerAll),e.element.bind("mouseover."+e.widgetName,function(){n.addClass(i.stateHover)}).bind("mouseout."+e.widgetName,function(){n.removeClass(i.stateHover)}).bind("mousedown."+e.widgetName,function(){n.addClass(i.stateActive)}).bind("mouseup."+e.widgetName,function(){n.removeClass(i.stateActive)}).bind("focus."+e.widgetName,function(){n.addClass(i.stateFocus)}).bind("blur."+e.widgetName,function(){n.removeClass(i.stateFocus)}),(n.is(":disabled")||e._isDisabled())&&e._setOption("disabled",!0),t.prototype._create.call(this)},n.prototype.destroy=function(){var e=this,n=e.options.wijCSS;e.element.removeClass(n.widget).removeClass(n.stateDefault).removeClass(n.cornerAll).removeClass(n.stateHover).removeClass(n.stateActive).removeClass(n.stateFocus).removeClass(n.wijtextbox).unbind("."+e.widgetName),t.prototype.destroy.call(this)},n.prototype._innerDisable=function(){t.prototype._innerDisable.call(this),this._toggleDisableInput(!0)},n.prototype._innerEnable=function(){t.prototype._innerEnable.call(this),this._toggleDisableInput(!1)},n.prototype._toggleDisableInput=function(e){this.element.attr("disabled",e)},n}(t.wijmoWidget);n.wijtextbox=s;var o=function(){function e(){this.initSelector=":jqmData(role='wijtextbox')",this.wijCSS={wijtextbox:"wijmo-wijtextbox"},this.wijMobileCSS={stateDefault:"ui-input-text"}}return e}();s.prototype.options=r.extend(!0,{},t.wijmoWidget.prototype.options,new o),r.wijmo.registerWidget(i,s.prototype)})(t.textbox||(t.textbox={}));var n=t.textbox})(wijmo||(wijmo={}))});