var t = require; var e = module; var i = exports; e = (this && this.__decorate) || function (t, e, i, s) { var o, a = arguments.length, n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s); else for (var r = t.length - 1; 0 <= r; r--) (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n); return 3 < a && n && Object.defineProperty(e, i, n), n; }; Object.defineProperty(i, "__esModule", {value: !0}); const a = t("App"), s = t("GameText"), n = t("CostumeConst"), {ccclass: o, property: r} = cc._decorator; t = class extends cc.Component { constructor() { super(...arguments), (this.descRichText = null), (this.baseItem = null), (this.newItem = null), (this.head_0 = null), (this.head_1 = null), (this.materialItems = []); } setData(t) { this.updateItem(this.baseItem, t.step), this.updateItem(this.newItem, t.step + 1), this.updateItem(this.materialItems[0], t.costume_type_grade), 2 === t.costume_count ? ((this.materialItems[1].active = !0), this.updateItem(this.materialItems[1], t.costume_type_grade)) : (this.materialItems[1].active = !1); var e = 2 == t.ingredient_costume_type; (this.head_0.active = !e), (this.head_1.active = e), (this.descRichText.string = s.GameText.getTextByStr(t.costume_merge_desc)); } updateItem(t, e) { var i = t.getComponent(cc.Sprite); a.default.CommonUtils.setSpriteFrame(n.getRarityUrlByGrade(e), i); const s = t.getChildByName("ArrowList").children; var o = n.getGradeLv(e); for (let t = 0; t < s.length; t++) s[t].active = t < o; } }; e([r(cc.RichText)], t.prototype, "descRichText", void 0), e([r(cc.Node)], t.prototype, "baseItem", void 0), e([r(cc.Node)], t.prototype, "newItem", void 0), e([r(cc.Node)], t.prototype, "head_0", void 0), e([r(cc.Node)], t.prototype, "head_1", void 0), e([r([cc.Node])], t.prototype, "materialItems", void 0), (t = e([o], t)), (i.default = t);