var e=class e extends ui.view.DefaultTheme.ThanksUI{constructor(){super(),this.btnBack.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MAIN)),this.listSupports.renderHandler=Laya.Handler.create(this,this.renderSupport,null,!1),this.panelTopSupports.vScrollBar.elasticDistance=150,this.listSupports.scrollBar.elasticDistance=150,this.btnAFD.on(Laya.Event.CLICK,this,goto,[`sponsor_afd`]),this.btnDDF.on(Laya.Event.CLICK,this,goto,[`sponsor_ddf`])}static#e=Laya.plugin.extractComponents(e.uiView,[`boxTopSupport`]);#t(){let t=e.#e(`boxTopSupport`);return t.name=t.getChildByName(`name`),t.comment=t.getChildByName(`comment`),$_.deepMapSet(t,$ui.common.topSupportItem),t}#n;init(){let e=[];this.#n=[],core.specialThanks.sort(()=>.5-Math.random()).forEach(({group:t,name:n,comment:r,color:i})=>t==2?e.push({name:n,color:i}):this.renderTopSupport(n,r,i)),this.listSupports.array=e}renderTopSupport(e,t,n){let r=this.#t();r.name.text=e,r.comment.text=t,r.name.color=n||`#000000`,this.vboxTopSupports.addChild(r),this.#n.push(r),this.#n.forEach((e,t)=>e.y=t)}renderSupport(e){let{name:t,color:n}=e.dataSource;e.text=t,e.color=n||$ui.common.defaultFontColor}close(){this.#n.forEach(e=>{e.removeSelf(),e.destroy()}),this.#n=null}};export{e as default};