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AAC,CAAC;qDACY;IAjB9B,gBAAgB;QAD5B,OAAO;OACK,gBAAgB,CA8E5B;IAAD,uBAAC;KAAA;AA9EY,4CAAgB","file":"","sourceRoot":"/","sourcesContent":["import { ResUtils } from \"simba-cc-resutils\";\nimport { SDK } from \"simba-sdk\";\nimport { GameRecord } from \"../../../../../avg/AVG\";\nimport { DummyLabel, DummyNode, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../../common/classbase/CCViewBase\";\nimport { GameTextData } from \"../../../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../../../common/gameplay/managers/UIManager\";\nimport { MainTabs } from \"../../../../Enums\";\nimport { GameModelManager } from \"../../../../model/GameModelManager\";\nimport AlertDialogViewPresenter from \"../../../presenter/AlertDialogViewPresenter\";\nimport { AlertDialogViewProps } from \"../../type/AlertDialogView\";\nimport { GiftListItemProps } from \"../../type/GiftListSubview\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport class GiftListItemImpl extends CCPureView<GiftListItemProps & { onClick: () => void }> {\n //#region editor bindings\n @property(cc.Node)\n private checkNode = DummyNode;\n @property(cc.Sprite)\n private bgSprite = DummySprite;\n @property(cc.Sprite)\n private iconSprite = DummySprite;\n @property(cc.Sprite)\n private likeSprite = DummySprite;\n @property(cc.Label)\n private numLabel = DummyLabel;\n @property(cc.Label)\n private likeLabel = DummyLabel;\n @property([cc.SpriteFrame])\n private bgSFs: cc.SpriteFrame[] = [];\n @property([cc.SpriteFrame])\n private likeSFs: cc.SpriteFrame[] = [];\n\n onClick() {\n let storeUnlocked = GameRecord.recordVariables[\"MallViewPresenter\"] === 1;\n if (this._props.count === 0) {\n if (storeUnlocked) {\n this.showEnterStoreAlert();\n } else {\n UIManager.showToast(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_MAIN_FUNCTION_NOT_OPEN));\n }\n } else {\n this._props.onClick();\n }\n }\n //#endregion\n\n private _likeLabelColors = [cc.color(115, 105, 192), cc.color(148, 148, 148)];\n\n get checked() { return this.checkNode.active }\n\n onLoad() {\n super.onLoad();\n this.bindProp(\"count\", (v) => {\n this.numLabel.string = v.toString();\n let index = v === 0 ? 1 : 0;\n this.bgSprite.spriteFrame = this.bgSFs[index];\n this.likeSprite.spriteFrame = this.likeSFs[index];\n this.likeLabel.node.color = this._likeLabelColors[index];\n this.iconSprite.setMaterial(0, this.iconSprite.getMaterials()[index + 1]);\n });\n this.bindProp(\"addLike\", (v) => this.likeLabel.string = \"+\" + v);\n this.bindProp(\"icon\", async (v) => {\n if (v) {\n let sf = await ResUtils.loadRes(v, cc.SpriteFrame, 2);\n if (cc.isValid(this.iconSprite)) {\n this.iconSprite.spriteFrame = sf;\n }\n }\n });\n this.bindProp(\"select\", this.checkNode, \"active\");\n\n // this.node.on(cc.Node.EventType.)\n }\n\n showEnterStoreAlert() {\n let temp: AlertDialogViewProps =\n {\n dataptr: {},\n titlecontent: GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_NO_THIS_PROP_TITLE_VALUE),\n content: GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_ENTER_STORE_VALUE),\n ishasad: false,\n istwobtn: true,\n adconfig: \"\",\n // items: [],\n hasBanner: false,\n callback: (type, ret: boolean, param: any) => {\n SDK.hideBannerAd();\n }\n };\n UIManager.pushPresenter(AlertDialogViewPresenter, temp);\n }\n}"]}