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AAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;uDACvB;IAExC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;4DACvB;IAElD;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;2DACvB;IAXxC,YAAY;QAFxB,OAAO;QACP,gCAAO,CAAC,uBAAY,EAAE,oBAAoB,CAAC;OAC/B,YAAY,CAuDxB;IAAD,mBAAC;KAAA;AAvDY,oCAAY","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummyNode, DummySprite } from \"../../../../common/CCDummyObjects\";\nimport { CCPureView, CCView } from \"../../../../common/classbase/CCViewBase\";\nimport { View } from \"../../../../common/classbase/ViewBase\";\nimport { UIManager } from \"../../../../common/gameplay/managers/UIManager\";\nimport { DiscoverSettingViewPresenter } from \"../../presenter/discover/DiscoverSettingViewPresenter\";\nimport { RegView } from \"../../PresenterCCViewFactory\";\nimport { MainView, MainViewProps, MainViewType } from \"../type/MainView\";\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(MainViewType, \"prefab/ui/MainView\")\nexport class MainViewImpl extends CCPureView<MainViewProps> implements MainView {\n //#region editor bindings\n @property({ type: cc.Node })\n private contentParent: cc.Node = DummyNode;\n @property({ type: cc.Sprite })\n private titleSprite: cc.Sprite = DummySprite;\n @property({ type: [cc.Button], displayName: \"Tabbar Buttons\" })\n private tabbarButtons: cc.Button[] = [];\n @property({ type: [cc.SpriteFrame], displayName: \"Tabbar Spriteframes\" })\n private tabbarSpriteFrames: cc.SpriteFrame[] = [];\n @property({ type: [cc.SpriteFrame], displayName: \"Title Spriteframes\" })\n private titleSpriteFrames: cc.SpriteFrame[] = [];\n\n onTabButtonClick = (event, index: string) => {\n this._props.onTabClick(parseInt(index));\n }\n\n private _tabContentContainer: View;\n\n\n onLoad() {\n this._tabContentContainer = this.contentParent.addComponent(CCView);\n\n this.bindProp(\"messageRedDot\", this.tabbarButtons[0].node.getChildByName(\"RedDot\"), \"active\");\n this.bindProp(\"datingEventRedDot\", this.tabbarButtons[1].node.getChildByName(\"RedDot\"), \"active\");\n }\n\n\n\n\n getTabContentContainer(): View {\n return this._tabContentContainer;\n }\n\n onPropsLoad(props: Readonly<MainViewProps>) {\n super.onPropsLoad(props);\n let currTab = this._props.selectedTab;\n this.tabbarButtons[currTab].normalSprite = this.tabbarSpriteFrames[currTab * 2 + 1];\n this.titleSprite.spriteFrame = this.titleSpriteFrames[currTab];\n }\n\n onPropChange(key: Extract<keyof MainViewProps, string>) {\n super.onPropChange(key);\n if (key === \"selectedTab\") {\n let prevTab = this._prevProps.selectedTab;\n this.tabbarButtons[prevTab].normalSprite = this.tabbarSpriteFrames[prevTab * 2];\n let currTab = this._props.selectedTab;\n this.tabbarButtons[currTab].normalSprite = this.tabbarSpriteFrames[currTab * 2 + 1];\n this.titleSprite.spriteFrame = this.titleSpriteFrames[currTab];\n }\n }\n\n onSettingClick(event:cc.Event.EventTouch,eventData:string){\n UIManager.pushPresenter(DiscoverSettingViewPresenter,undefined);\n }\n}"]}