(function(n){n.registerView("Threshold:Section",new Sparkle.View(React.createClass({displayName:"Threshold:Section",componentWillMount:function(){Sparkle.inst&&Sparkle.inst.start("render","Threshold:Section")},componentDidMount:function(){Sparkle.inst&&Sparkle.inst.stop("render","Threshold:Section")},componentWillUpdate:function(){Sparkle.inst&&Sparkle.inst.start("update","Threshold:Section")},componentDidUpdate:function(){Sparkle.inst&&Sparkle.inst.stop("update","Threshold:Section")},getInitialState:function(){var n=this.props||{},f=n.viewData||{},i=n.properties||{},t={},e=LocStringManager.getLocString({uiCulture:n.uiCulture,name:"LocStrings",namespace:"Threshold"}),r=i.Section,u=i.HideNoResults;return t.CssClass=r.Layout===1?"b_twoColumn":"b_oneColumn",t},render:function(){var p=this,t=this.props||{},k=t.viewData||{},a=t.properties||{},o=[],n=t.encoder||Sparkle.defaultEncoder,l=LocStringManager.getLocString({uiCulture:t.uiCulture,name:"LocStrings",namespace:"Threshold"}),i=a.Section,w=a.HideNoResults,b=this.state.CssClass,s={},f="",r,u,h,c,v,e,y;f+="b_hList "+b,f&&(s.className=n.writeAttribute(f)),s.onContextMenu=function(n){var i=new Sparkle.RenderedView(p),t=n;return!1},r=Sparkle.copyContext(t,s),i.AllView&&i.HasResults&&(u={},u.PartnerTestHook=n.writeAttribute("DeviceContent.SectionTitle"),u.Title=n.writeAttribute(i.Title),h=Sparkle.resolveView("Shared:GroupLabel"),c=Sparkle.copyContext(t,u),r.defaultSegment.push(h.renderView(c)));for(v in i.SubSections)e=i.SubSections[v],typeof e!="function"&&function(u){var y,p,k,ot,ct,nt,ht,f,s,tt,st,c,b,yt,v,h,o,at,a,it,g,rt,ut,e,ft,et,lt;if(!w||u.State==6){y={},y["data-sectionname"]=n.writeAttribute(u.Key),TestHooksEnabled&&(y["data-tag"]=n.writeAttribute("DeviceContent.Group")),p=Sparkle.copyContext(t,y),k={},k.Name=n.writeAttribute(u.InstRegionName);var pt=Sparkle.resolveView("Threshold:Region"),d=Sparkle.copyContext(t,k),vt={};vt.subsection=n.writeAttribute(u),ot=Sparkle.resolveView("Threshold:SubsectionHeader"),ct=Sparkle.copyContext(t,vt),d.defaultSegment.push(ot.renderView(ct)),nt={},nt.InstItem=n.writeAttribute(u.InstItem),ht=Sparkle.resolveView("Threshold:Region"),f=Sparkle.copyContext(t,nt),u.State==1?(s={},s.className=n.writeAttribute("b_secondaryText"),TestHooksEnabled&&(s["data-tag"]=n.writeAttribute("SubSection.Loading")),tt=Sparkle.copyContext(t,s),n.writeContent(l.Loading,tt.defaultSegment),st=Sparkle.resolveView("p").renderView(tt),f.defaultSegment.push(st)):u.State==2||u.State==3||u.State==4?(c={},c.className=n.writeAttribute("b_secondaryText"),TestHooksEnabled&&(c["data-tag"]=n.writeAttribute("SubSection.Error")),b=Sparkle.copyContext(t,c),n.writeContent(l.TryAgainError,b.defaultSegment),yt=Sparkle.resolveView("p").renderView(b),f.defaultSegment.push(yt)):u.State==5?(v={},v.className=n.writeAttribute("b_secondaryText"),TestHooksEnabled&&(v["data-tag"]=n.writeAttribute("DeviceContent.NoItems")),h=Sparkle.copyContext(t,v),n.writeContent(u.NoResultsLabel,h.defaultSegment),u.HasSeeMoreLink&&(o={},o["class"]=n.writeAttribute("b_noTarget"),o["data-dest"]=n.writeAttribute(u.SeeMoreDestination),o.InstItem=n.writeAttribute(u.SearchMoreInstItem),at=Sparkle.resolveView("Threshold:InstLink"),a=Sparkle.copyContext(t,o),n.writeContent(" ",a.defaultSegment),n.writeContent(u.SeeMoreText,a.defaultSegment),h.defaultSegment.push(at.renderView(a))),it=Sparkle.resolveView("p").renderView(h),f.defaultSegment.push(it)):u.State==6&&(u.ViewModel.View=="densetilelayout"?(g={},g.ViewModel=n.writeAttribute(u.ViewModel),rt=Sparkle.resolveView("Threshold:DenseTileLayout"),ut=Sparkle.copyContext(t,g),f.defaultSegment.push(rt.renderView(ut))):u.ViewModel.View=="itemlist"&&(e={},e.ViewModel=n.writeAttribute(u.ViewModel),e.IsTwoColumn=n.writeAttribute(i.Layout===1),e.ItemType=n.writeAttribute(i.Key),ft=Sparkle.resolveView("Threshold:ItemList"),et=Sparkle.copyContext(t,e),f.defaultSegment.push(ft.renderView(et)))),d.defaultSegment.push(ht.renderView(f)),p.defaultSegment.push(pt.renderView(d)),lt=Sparkle.resolveView("li").renderView(p),r.defaultSegment.push(lt)}}(e);return y=Sparkle.resolveView("ul").renderView(r),o.push(y),o[o.length-1]}})))})(Sparkle.viewFolder)