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}), (i.CostumeMergeItem = void 0); const s = t("App"), o = t("ItemRenderer"), a = (t("ViewConst"), t("GameConst")), n = t("CostumeConst"), {ccclass: r, property: l} = cc._decorator; t = class extends o.default { constructor() { super(...arguments), (this.typeIcon = null), (this.icon = null), (this.bgNode = null), (this.equipNode = null), (this.lvLab = null), (this.arrowList = null), (this.data = null), (this.redpointImg = null); } setData(t) { (this.data = t), (this.lvLab.string = "Lv." + t.data.lv), s.default.CommonUtils.setSpriteFrame( n.getRarityUrlByGrade(t.data.grade), this.bgNode.getComponent(cc.Sprite) ), (this.equipNode.active = t.isEquip), s.default.CommonUtils.setSpriteFrameByBundle(a.BundleType.MAP_ICON, t.getIcon(), this.icon), s.default.CommonUtils.setSpriteFrameByBundle(a.BundleType.MAP_ICON, t.getTypeIcon(), this.typeIcon); var e = n.getGradeLv(t.data.grade); const i = this.arrowList.children; for (let t = 0; t < i.length; t++) i[t].active = t < e; this.redpointImg.active = t.canMerge; } onToucItem() { s.default.ViewManager.open(26, this.data); } }; e([l(cc.Sprite)], t.prototype, "typeIcon", void 0), e([l(cc.Sprite)], t.prototype, "icon", void 0), e([l(cc.Node)], t.prototype, "bgNode", void 0), e([l(cc.Node)], t.prototype, "equipNode", void 0), e([l(cc.Label)], t.prototype, "lvLab", void 0), e([l(cc.Node)], t.prototype, "arrowList", void 0), e([l(cc.Node)], t.prototype, "redpointImg", void 0), (t = e([r()], t)), (i.CostumeMergeItem = t);