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"), n = t("ControllerConst"), r = t("BagConst"), l = t("CostumeConst"), h = t("GameConst"), {ccclass: s, property: o} = cc._decorator; t = class extends cc.Component { constructor() { super(...arguments), (this.iconSpr = null), (this.num = null), (this.bgSpr = null), (this.costumeTypeSpr = null), (this.arrowList = null); } setData(t, e) { let i = Number(t); this.num.string = "x" + e; const s = a.default.ControllerManager.applyFunc(n.ControllerConst.Item, r.BagConst.GET_ITEM, i); if (s.isCostume()) { const t = s.getTempCostume(); (this.costumeTypeSpr.node.active = !0), (this.arrowList.active = !0), a.default.CommonUtils.setSpriteFrame(l.getRarityUrlByGrade(t.data.grade), this.bgSpr), a.default.CommonUtils.setSpriteFrameByBundle(h.BundleType.MAP_ICON, t.getIcon(), this.iconSpr), a.default.CommonUtils.setSpriteFrameByBundle( h.BundleType.MAP_ICON, t.getTypeIcon(), this.costumeTypeSpr ); var o = l.getGradeLv(t.data.grade); const i = this.arrowList.children; for (let t = 0; t < i.length; t++) i[t].active = t < o; } else (this.costumeTypeSpr.node.active = !1), (this.arrowList.active = !1), a.default.CommonUtils.setSpriteFrame(s.getItemPic(), this.iconSpr); } }; e([o(cc.Sprite)], t.prototype, "iconSpr", void 0), e([o(cc.Label)], t.prototype, "num", void 0), e([o(cc.Sprite)], t.prototype, "bgSpr", void 0), e([o(cc.Sprite)], t.prototype, "costumeTypeSpr", void 0), e([o(cc.Node)], t.prototype, "arrowList", void 0), (t = e([s], t)), (i.default = t);