//>>built
define("dojox/mobile/bidi/Switch",["dojo/_base/declare","./common","dojo/dom-class"],function(d,a,c){return d(null,{postCreate:function(){this.inherited(arguments);!this.textDir&&this.getParent()&&this.getParent().get("textDir")&&this.set("textDir",this.getParent().get("textDir"))},buildRendering:function(){this.inherited(arguments);this.isLeftToRight()||(c.add(this.left,"mblSwitchBgLeftRtl"),c.add(this.left.firstChild,"mblSwitchTextLeftRtl"),c.add(this.right,"mblSwitchBgRightRtl"),c.add(this.right.firstChild,
"mblSwitchTextRightRtl"))},_newState:function(a){return this.isLeftToRight()?this.inherited(arguments):this.inner.offsetLeft<-(this._width/2)?"on":"off"},_setLeftLabelAttr:function(b){this.inherited(arguments);this.left.firstChild.innerHTML=a.enforceTextDirWithUcc(this.left.firstChild.innerHTML,this.textDir)},_setRightLabelAttr:function(b){this.inherited(arguments);this.right.firstChild.innerHTML=a.enforceTextDirWithUcc(this.right.firstChild.innerHTML,this.textDir)},_setTextDirAttr:function(b){!b||
this._created&&this.textDir===b||(this.textDir=b,this.left.firstChild.innerHTML=a.removeUCCFromText(this.left.firstChild.innerHTML),this.left.firstChild.innerHTML=a.enforceTextDirWithUcc(this.left.firstChild.innerHTML,this.textDir),this.right.firstChild.innerHTML=a.removeUCCFromText(this.right.firstChild.innerHTML),this.right.firstChild.innerHTML=a.enforceTextDirWithUcc(this.right.firstChild.innerHTML,this.textDir))}})});