//>>built
define("dojox/mobile/Heading","dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/_base/window dojo/dom-class dojo/dom-construct dojo/dom-style dojo/dom-attr dijit/registry ./common dijit/_Contained dijit/_Container dijit/_WidgetBase ./ProgressIndicator ./ToolBarButton ./View dojo/has dojo/has!dojo-bidi?dojox/mobile/bidi/Heading".split(" "),function(k,f,l,m,t,n,e,g,p,B,u,v,w,x,y,z,C,q,A){m.getObject("dojox.mobile",!0);f=l(q("dojo-bidi")?"dojox.mobile.NonBidiHeading":"dojox.mobile.Heading",
[x,w,v],{back:"",href:"",moveTo:"",transition:"slide",label:"",iconBase:"",tag:"h1",busy:!1,progStyle:"mblProgWhite",baseClass:"mblHeading",buildRendering:function(){this.templateString||(this.domNode=this.containerNode=this.srcNodeRef||t.doc.createElement(this.tag));this.inherited(arguments);this.templateString||(this.label||k.forEach(this.domNode.childNodes,function(a){if(3==a.nodeType){var b=m.trim(a.nodeValue);b&&(this.label=b,this.labelNode=e.create("span",{innerHTML:b},a,"replace"))}},this),
this.labelNode||(this.labelNode=e.create("span",null,this.domNode)),this.labelNode.className="mblHeadingSpanTitle",this.labelDivNode=e.create("div",{className:"mblHeadingDivTitle",innerHTML:this.labelNode.innerHTML},this.domNode));this.labelDivNode&&(p.set(this.labelDivNode,"role","heading"),p.set(this.labelDivNode,"aria-level","1"));u.setSelectable(this.domNode,!1)},startup:function(){if(!this._started){var a=this.getParent&&this.getParent();if(!a||!a.resize){var b=this;b.defer(function(){b.resize()})}this.inherited(arguments)}},
resize:function(){if(this.labelNode){for(var a,b,d=this.containerNode.childNodes,h=d.length-1;0<=h;h--){var c=d[h];1===c.nodeType&&"none"!==g.get(c,"display")&&(b||"right"!==g.get(c,"float")||(b=c),a||"left"!==g.get(c,"float")||(a=c))}!this.labelNodeLen&&this.label&&(this.labelNode.style.display="inline",this.labelNodeLen=this.labelNode.offsetWidth,this.labelNode.style.display="");d=this.domNode.offsetWidth;n[d-2*Math.max(b?d-b.offsetLeft+5:0,a?a.offsetLeft+a.offsetWidth+5:0)>(this.labelNodeLen||
0)?"add":"remove"](this.domNode,"mblHeadingCenterTitle")}k.forEach(this.getChildren(),function(r){r.resize&&r.resize()})},_setBackAttr:function(a){this._set("back",a);this.backButton?this.backButton.set("label",a):(this.backButton=new z({arrow:"left",label:a,moveTo:this.moveTo,back:!this.moveTo&&!this.href,href:this.href,transition:this.transition,transitionDir:-1,dir:this.isLeftToRight()?"ltr":"rtl"}),this.backButton.placeAt(this.domNode,"first"));this.resize()},_setMoveToAttr:function(a){this._set("moveTo",
a);this.backButton&&(this.backButton.set("moveTo",a),this.backButton.set("back",!a&&!this.href))},_setHrefAttr:function(a){this._set("href",a);this.backButton&&(this.backButton.set("href",a),this.backButton.set("back",!this.moveTo&&!a))},_setTransitionAttr:function(a){this._set("transition",a);this.backButton&&this.backButton.set("transition",a)},_setLabelAttr:function(a){this._set("label",a);this.labelNode.innerHTML=this.labelDivNode.innerHTML=this._cv?this._cv(a):a;delete this.labelNodeLen},_setBusyAttr:function(a){var b=
this._prog;a?(b||(b=this._prog=new y({size:30,center:!1}),n.add(b.domNode,this.progStyle)),e.place(b.domNode,this.domNode,"first"),b.start()):b&&b.stop();this._set("busy",a)}});return q("dojo-bidi")?l("dojox.mobile.Heading",[f,A]):f});