//>>built
define("dojox/mobile/TreeView","dojo/_base/kernel dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/_base/window dojo/dom-construct dijit/registry ./Heading ./ListItem ./ProgressIndicator ./RoundRectList ./ScrollableView ./viewRegistry dojo/has dojo/has!dojo-bidi?dojox/mobile/bidi/TreeView".split(" "),function(e,w,m,n,p,x,h,y,q,z,r,t,A,u,B){e.experimental("dojox.mobile.TreeView");e=m(u("dojo-bidi")?"dojox.mobile.NonBidiTreeView":"dojox.mobile.TreeView",t,{postCreate:function(){this._load();
this.inherited(arguments)},_customizeListItem:function(a){},_load:function(){this.model.getRoot(n.hitch(this,function(a){var b=this,c=new r;a={label:b.model.rootLabel,moveTo:"#",onClick:function(){b.handleClick(this)},item:a};this._customizeListItem(a);a=new q(a);c.addChild(a);this.addChild(c)}))},handleClick:function(a){var b="view_";b=a.item[this.model.newItemIdAttr]?b+a.item[this.model.newItemIdAttr]:b+"rootView";b=b.replace("/","_");if(h.byId(b))h.byNode(a.domNode).transitionTo(b);else{var c=
z.getInstance();p.body().appendChild(c.domNode);c.start();this.model.getChildren(a.item,n.hitch(this,function(k){var f=this,v=new r;w.forEach(k,function(l,C){var d={item:l,label:l[f.model.store.label],transition:"slide"};f._customizeListItem(d);f.model.mayHaveChildren(l)&&(d.moveTo="#",d.onClick=function(){f.handleClick(this)});d=new q(d);v.addChild(d)});k=new y({label:"Dynamic View",back:"Back",moveTo:A.getEnclosingView(a.domNode).id,dir:this.isLeftToRight()?"ltr":"rtl"});var g=t({id:b,dir:this.isLeftToRight()?
"ltr":"rtl"},x.create("div",null,p.body()));g.addChild(k);g.addChild(v);g.startup();c.stop();h.byNode(a.domNode).transitionTo(g.id)}))}}});return u("dojo-bidi")?m("dojox.mobile.TreeView",[e,B]):e});