define(["dojo/_base/declare","dijit/form/ValidationTextBox","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/on","dojo/ready"],function(declare,textBox,domClass,domGeom,style,on,ready){return declare("core/ui/ALabelBox",textBox,{labelText:"",_showLabel:true,_label:null,hasIcon:false,iconNode:null,icon:null,iconNodeOnClick:null,postCreate:function(){this.inherited(arguments);var self=this;var domNode=this.domNode;domClass.add(this.domNode,"medBox opHasLabel");if(this.hasIcon) {this.iconNode=document.createElement("div");this.iconNode.className="labelBoxIconNode";this.domNode.insertBefore(this.iconNode,this.domNode.firstChild);this.focusNode.parentNode.className+=" hasIcon"} this.domNode.style.position="relative";domClass.add(this.domNode,"a-medBox");this.label_div=document.createElement("div");domClass.add(this.label_div,"a-label-box-label");this.label_div.innerHTML=this.labelText;this.domNode.appendChild(this.label_div);if(this.value.length) {domClass.add(self.label_div,"a-label-box-label-with-value")} setTimeout(function(){if(self._beingDestroyed) {return} if(self.get("value").length) {domClass.add(self.label_div,"a-label-box-label-with-value")}},200);on(this.focusNode,"focus",function(){domClass.add(self.label_div,"a-label-box-label-with-focus")});on(this,"change",function(){domClass.remove(self.label_div,"a-label-box-label-with-focus");if(self.get("value").length) {domClass.add(self.label_div,"a-label-box-label-with-value")} else {domClass.remove(self.label_div,"a-label-box-label-with-value")}});on(this.focusNode,"blur",function(){domClass.remove(self.label_div,"a-label-box-label-with-focus");if(self.get("value").length) {domClass.add(self.label_div,"a-label-box-label-with-value")} else {domClass.remove(self.label_div,"a-label-box-label-with-value")}});this.startup()},addLabel:function(){return this},resizeLabel:function(){return this},_setIconAttr:function(html){if(this.iconNode) {this.iconNode.innerHTML=html}},setIconNodeOnClickAttr:function(func){this.iconNodeOnClick=func;if(this.iconNode) {this.iconNode.onclick=this.iconNodeOnClick}}})});