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,CAAC;QACP,CAAC;QAED,WAAW,CAAC,KAA0C;YAClD,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QAED,kBAAkB,CAAC,KAAK;YACpB,IAAI,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QAED,YAAY,CAAC,GAAqD;YAC9D,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;KAoBJ,CAAA;IA7OG;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;gEACgB;IAEpC;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;mEAC2B;IAE/C;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;0EACgC;IAElD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;2EACiC;IAEnD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;2EACiC;IAEnD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;iFACuC;IAEzD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;gFACsC;IAGxD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;+EACqC;IAlBtC,wBAAwB;QAF5C,OAAO;QACP,gCAAO,CAAC,+CAAwB,EAAE,gCAAgC,CAAC;OAC/C,wBAAwB,CAgP5C;IAAD,+BAAC;KAAA;kBAhPoB,wBAAwB","file":"","sourceRoot":"/","sourcesContent":["import { ResUtils } from \"simba-cc-resutils\";\nimport { DeepReadonly, DeepReadonlyObject } from \"simba-utils\";\nimport { richNodesToCocosString, SentenceOption, SentenceSelectContent, SentenceType } from \"../../../../../avg/AVG\";\nimport { DummyLayout, DummyNode, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { CCPureView, CCView } from \"../../../../../common/classbase/CCViewBase\";\nimport { GameTextData } from \"../../../../../common/gameplay/gamedata/GameTextData\";\nimport { UIManager } from \"../../../../../common/gameplay/managers/UIManager\";\nimport { StringUtils } from \"../../../../../common/utils/StringUtils\";\nimport { SpecialDateContentStatus, SpecialDateContentType } from \"../../../../Enums\";\nimport { GameModelManager } from \"../../../../model/GameModelManager\";\nimport AlertDialogViewPresenter from \"../../../presenter/AlertDialogViewPresenter\";\nimport { RegView } from \"../../../PresenterCCViewFactory\";\nimport { AlertDialogViewProps } from \"../../type/AlertDialogView\";\nimport { SentenceSelectorView, SentenceSelectorViewProps, SentenceSelectorViewType } from \"../../type/SentenceSelectorView\";\n\nconst { ccclass, property } = cc._decorator;\n\nenum DateSelectNodeType {\n Invalid,\n SpecialGrace,\n SpecialSkin,\n GraceLocked,\n SkinLocked,\n Nomal_HasSpecial,\n Nomal,\n}\n\n@ccclass\n@RegView(SentenceSelectorViewType, \"prefab/ui/SentenceSelectorView\")\nexport default class SentenceSelectorViewImpl extends CCPureView<SentenceSelectorViewProps> implements SentenceSelectorView {\n //#region \n @property(cc.Sprite)\n background: cc.Sprite = DummySprite;\n @property(cc.Layout)\n private contentLayout: cc.Layout = DummyLayout;\n @property(cc.Node)\n private selectButtonTemplate: cc.Node = DummyNode;\n @property(cc.Node)\n private selectButtonTemplate1: cc.Node = DummyNode;\n @property(cc.Node)\n private template_date_special: cc.Node = DummyNode;\n @property(cc.Node)\n private template_date_grace_unclick: cc.Node = DummyNode;\n @property(cc.Node)\n private template_date_skin_unclick: cc.Node = DummyNode;\n\n @property(cc.Node)\n private template_date_not_special: cc.Node = DummyNode;\n //#endregion\n\n onButtonClick = (index: number, hasSpecial: boolean, specialType: SpecialDateContentType, specialStatus: SpecialDateContentStatus) => {\n return () => {\n this._props.onSelectIndexCallback(index);\n }\n }\n\n setContent = (content: DeepReadonly<SentenceSelectContent>) => {\n this.contentLayout.node.removeAllChildren();\n let hasSpecial = this.checkHasSpecial(content);\n for (let i = 0; i < content.value.length; i++) {\n let option = content.value[i];\n let modelNode = this.selectButtonTemplate;\n let modelType = DateSelectNodeType.Invalid;\n let index = i;\n let specialType = SpecialDateContentType.Invalid;\n let specialStatus = SpecialDateContentStatus.Invalid;\n if (this._props.isFromDate) {\n modelType = this.getDateNodeModelType(option, hasSpecial);\n switch (modelType) {\n case DateSelectNodeType.SpecialGrace:\n {\n modelNode = this.template_date_special;\n specialType = SpecialDateContentType.Grace;\n specialStatus = SpecialDateContentStatus.Unlocked;\n }\n break;\n case DateSelectNodeType.SpecialSkin:\n {\n modelNode = this.template_date_special;\n specialType = SpecialDateContentType.Skin;\n specialStatus = SpecialDateContentStatus.Unlocked;\n }\n break;\n case DateSelectNodeType.GraceLocked:\n {\n modelNode = this.template_date_grace_unclick;\n specialType = SpecialDateContentType.Grace;\n specialStatus = SpecialDateContentStatus.Locked;\n }\n break;\n case DateSelectNodeType.SkinLocked:\n {\n modelNode = this.template_date_skin_unclick;\n specialType = SpecialDateContentType.Skin;\n specialStatus = SpecialDateContentStatus.Locked;\n }\n break;\n case DateSelectNodeType.Nomal_HasSpecial:\n {\n modelNode = this.template_date_not_special;\n specialType = SpecialDateContentType.Nomal;\n specialStatus = SpecialDateContentStatus.Unlocked;\n }\n break;\n case DateSelectNodeType.Nomal:\n {\n modelNode = this.selectButtonTemplate1;\n }\n break;\n }\n }\n if (!modelNode) {\n return;\n }\n let node = cc.instantiate(modelNode);\n node.parent = this.contentLayout.node;\n node.active = true;\n let label = node.getChildByName(\"Label\").getComponent(cc.RichText);\n if (option.content && option.content.type === SentenceType.TEXT && !option.summary) {\n label.string = richNodesToCocosString(option.content.value);\n } else {\n label.string = option.summary;\n }\n if (this._props.isFromDate && modelType === DateSelectNodeType.GraceLocked || modelType === DateSelectNodeType.SkinLocked) {\n let tipStr = \"\";\n let titleStr = \"\";\n if (modelType === DateSelectNodeType.GraceLocked && option.enableCondition) {\n let roleIdStr = option.enableCondition.groups[0].items[0].target.replace(\"r.like\", \"\");\n let role = GameModelManager.getRoleData(parseInt(roleIdStr));\n let graceLevel = GameModelManager.getGraceLevelByGraceValue(parseInt(option.enableCondition.groups[0].items[0].oprand.value));\n // tipStr = StringUtils.format(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_GRACE_LOCKED), role?.getRoleName(), graceLevel);\n tipStr = StringUtils.format(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_WEAK_GRACE_TIP_FORMAT), role?.getRoleName(), graceLevel, role?.getRoleName());\n titleStr = GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_WEAK_GRACE);\n } else if (modelType === DateSelectNodeType.SkinLocked && option.enableCondition) {\n // let roleIdStr = option.enableCondition.groups[0].items[0].target.replace(\"r.skin\", \"\");\n // let role = GameModelManager.getRoleData(parseInt(roleIdStr));\n // let v = parseInt(option.enableCondition.groups[0].items[0].oprand.value);\n // let skinName = GameModelManager.getI18LanguageTxt(ConfigManager.getConfig(itemConfig, v).name);\n // // tipStr = StringUtils.format(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_SKIN_LOCKED), role?.getRoleName(), skinName);\n // tipStr = StringUtils.format(GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_INVALID_SKIN_TIP_FORMAT), role?.getRoleName(), skinName);\n // titleStr = GameModelManager.getLanguageTxt(GameTextData.GAME_TEXT_INVALID_SKIN);\n }\n node.on(\"click\", () => {\n // UIManager.showToast(tipStr);\n this.showSpecialPlotTip(titleStr, tipStr);\n });\n } else {\n node.on(\"click\", this.onButtonClick(index, hasSpecial, specialType, specialStatus));\n }\n }\n }\n\n showSpecialPlotTip = (title: string, content: string) => {\n let temp: AlertDialogViewProps =\n {\n dataptr: {},\n titlecontent: title,\n content: content,\n ishasad: false,\n istwobtn: false,\n adconfig: \"\",\n // items: [],\n hasBanner: false,\n callback: () => {\n\n }\n // location: CommonLocation.Event\n };\n UIManager.pushPresenter(AlertDialogViewPresenter, temp);\n }\n\n checkHasSpecial(content: DeepReadonly<SentenceSelectContent>): boolean {\n let hasSpecial: boolean = false;\n if (!content || !content.value || !content.value.length) {\n return false;\n }\n for (let i = 0; i < content.value.length; i++) {\n let sentenceOption = content.value[i];\n if (sentenceOption && sentenceOption.enableCondition) {\n if (sentenceOption.enableCondition.groups && sentenceOption.enableCondition.groups.length > 0\n && sentenceOption.enableCondition.groups[0].items\n && sentenceOption.enableCondition.groups[0].items.length > 0\n && sentenceOption.enableCondition.groups[0].items[0].target) {\n if ((sentenceOption.enableCondition.groups[0].items[0].target.startsWith(\"r.like\")) ||\n (sentenceOption.enableCondition.groups[0].items[0].target.startsWith(\"r.skin\"))) {\n hasSpecial = true;\n break;\n }\n }\n }\n }\n return hasSpecial;\n }\n\n open(parent: CCView) {\n super.open(parent);\n this.background.node.opacity = 0;\n }\n\n onPropsReceive() {\n super.onPropsReceive();\n this.background.node.opacity = 255;\n }\n\n onLoad() {\n this.bindProp(\"sentence\", async (value) => {\n if (value != null)\n this.setContent(value);\n });\n\n\n this.bindProp(\"backgroundpath\", async (value) => {\n if (value !== \"\") {\n this.background.spriteFrame = await ResUtils.loadRes<cc.SpriteFrame>(value, cc.SpriteFrame);\n } else {\n this.background.spriteFrame = undefined as any;\n }\n });\n\n this.bindProp(\"y\", (v) => {\n if (v === undefined) {\n this.background.getComponent(cc.Widget).enabled = true;\n this.background.node.y = -this.node.height / 2;\n } else {\n this.background.getComponent(cc.Widget).enabled = false;\n this.background.node.y = v;\n }\n });\n\n this.bindProp(\"clickcausehide\", async (value) => {\n this.node.off(cc.Node.EventType.TOUCH_END);\n this.background.node.off(cc.Node.EventType.TOUCH_END);\n if (this._props.clickcausehide) {\n this.node.on(cc.Node.EventType.TOUCH_END, this.onCloseHandleClick, this);\n this.background.node.on(cc.Node.EventType.TOUCH_END, this.onCloseHandleClick, this);\n }\n });\n }\n\n onPropsLoad(props: Readonly<SentenceSelectorViewProps>) {\n super.onPropsLoad(props);\n }\n\n onCloseHandleClick(event) {\n this.close();\n }\n\n onPropChange(key: Extract<keyof SentenceSelectorViewProps, string>) {\n super.onPropChange(key);\n }\n\n getDateNodeModelType = (sentenceOption: DeepReadonlyObject<SentenceOption>, hasSpeical: boolean): DateSelectNodeType => {\n let modelType = hasSpeical ? DateSelectNodeType.Nomal : DateSelectNodeType.Nomal;\n if (sentenceOption.enableCondition) {\n let ret = GameModelManager.checkSkinAndGraceCondition(sentenceOption.enableCondition);\n if (sentenceOption.enableCondition.groups && sentenceOption.enableCondition.groups.length > 0\n && sentenceOption.enableCondition.groups[0].items\n && sentenceOption.enableCondition.groups[0].items.length > 0\n && sentenceOption.enableCondition.groups[0].items[0].target) {\n if (sentenceOption.enableCondition.groups[0].items[0].target.startsWith(\"r.like\")) {\n modelType = ret ? DateSelectNodeType.SpecialGrace : DateSelectNodeType.GraceLocked;\n }\n // else if (sentenceOption.enableCondition.groups[0].items[0].target.startsWith(\"r.skin\")) {\n // modelType = ret ? DateSelectNodeType.SpecialSkin : DateSelectNodeType.SkinLocked;\n // }\n }\n }\n return modelType;\n }\n}"]}