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D,4BAAC;KAAA;kBA/GoB,qBAAqB","file":"","sourceRoot":"/","sourcesContent":["import { SDK } from \"simba-sdk\";\nimport { GameRecord } from \"../../../avg/AVG\";\nimport { Presenter } from \"../../../common/classbase/PresenterBase\";\nimport { UIManager } from \"../../../common/gameplay/managers/UIManager\";\nimport { GameModelManager } from \"../../model/GameModelManager\";\nimport { RegPresenter } from \"../PresenterCCViewFactory\";\nimport { DiscoverView, DiscoverViewProps, DiscoverViewType } from \"../view/type/DiscoverView\";\nimport { DiscoverSettingViewPresenter } from \"./discover/DiscoverSettingViewPresenter\";\nimport { GameTextData } from \"../../../common/gameplay/gamedata/GameTextData\";\nimport { DiscoverItemType } from \"../../Enums\";\nimport QRCodeViewPresenter from \"./QRCodeViewPresenter\";\nimport GameDotMgr from \"../../GameDotMgr\";\nimport ProductionTeamViewPresenter from \"./discover/ProductionTeamViewPresenter\";\n\n@RegPresenter(DiscoverViewType)\nexport default class DiscoverViewPresenter extends Presenter<undefined, DiscoverView> {\n static uuid = \"DiscoverViewPresenter\";\n\n private _viewProps: DiscoverViewProps;\n\n static isShowRedDot() {\n return false;\n }\n\n constructor() {\n super();\n }\n\n initViewProps() {\n this._viewProps = {\n manName: \"\",\n manId: \"\",\n manIcon: \"\",\n onCopyInfo: this.onCopyInfo,\n onItemClick: this.itemClickCallBack\n };\n }\n\n itemClickCallBack = (itemType: DiscoverItemType) => {\n switch (itemType) {\n case DiscoverItemType.Settings:\n this.hideGameClubBtn();\n UIManager.pushPresenter(DiscoverSettingViewPresenter, undefined);\n break;\n case DiscoverItemType.Forum:\n break;\n case DiscoverItemType.CustomerService:\n this.hideGameClubBtn();\n //点击二维码打点\n GameDotMgr.getInstance().dotClickUI(\"CustomerService\");\n UIManager.pushPresenter(QRCodeViewPresenter, undefined);\n break;\n case DiscoverItemType.ProductionTeam:\n this.hideGameClubBtn();\n //点击二维码打点\n UIManager.pushPresenter(ProductionTeamViewPresenter, undefined);\n break;\n default:\n UIManager.showToast(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_DEVELOPING_VALUE));\n break;\n }\n }\n\n onCopyInfo = async () => {\n await SDK.setClipboardData(this._viewProps.manId);\n UIManager.showToast(\"用户ID:\" + this._viewProps.manId);\n }\n\n initItemConfig() {\n this._viewProps.manName = GameRecord.globalVariables.playerName;\n if (SDK.getLoginInfo()?.playerId) {\n this._viewProps.manId = SDK.getLoginInfo()?.playerId as string;\n }\n let player = GameModelManager.getPlayerData();\n this._viewProps.manName = player.getConfig().name;\n this._viewProps.manIcon = player.getHeadIcon();\n }\n\n onOpen() {\n super.onOpen(undefined);\n this._disposable.add(GameModelManager.PlayerOptionSkin.on(this.onPlayerOptionSkin));\n this._disposable.add(GameModelManager.ForceEnterDiscoverSubView.on(this.onForceEnterDiscoverSubView));\n this.onShow();\n }\n\n onForceEnterDiscoverSubView = (itemType: DiscoverItemType) => {\n this.itemClickCallBack(itemType);\n }\n\n onPlayerOptionSkin = () => {\n this.initViewProps();\n this.initItemConfig();\n this._view.updateProps(this._viewProps);\n }\n\n onShow() {\n super.onShow();\n this.initViewProps();\n this.initItemConfig();\n this.view.setProps(this._viewProps);\n this.view.createGameClubBtn();\n this.showGameClubBtn();\n }\n\n onEnterBackground() {\n super.onEnterBackground();\n this.hideGameClubBtn();\n }\n\n onEnterForeground() {\n super.onEnterForeground();\n this.showGameClubBtn();\n }\n\n onHide() {\n super.onHide();\n SDK.destroyGameClubButton();\n }\n\n showGameClubBtn() {\n SDK.showGameClubButton();\n }\n\n hideGameClubBtn() {\n SDK.hideGameClubButton();\n }\n}\n"]}