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 s = t("BaseView"), o = t("AbilityInfoService"), a = t("AbilityViewItem"), { ccclass: n, property: r, menu: l } = cc._decorator; t = class extends s.default { constructor() { super(...arguments), (this.itemPre = null), (this.content = null), (this.abilityViewItems = null), (this.bgType = 1); } initUI() { super.initUI(), this.initItem(); } open() { super.open(), this.updateUI(); } initItem() { this.abilityViewItems = []; var s = o.default.ins.datas; for (let i = 0; i < s.length; i++) { let t = cc.instantiate(this.itemPre); this.content.addChild(t); let e = t.getComponent(a.default); e.setData(s[i]), this.abilityViewItems.push(e); } } updateUI() { const e = o.default.ins.datas; for (let t = 0; t < e.length; t++) if (!e[t].isUnlock() && (0 === t || e[t - 1].isUnlock())) { this.abilityViewItems[t].showUnlockBtn(); break; } } }; e([r(cc.Prefab)], t.prototype, "itemPre", void 0), e([r(cc.Node)], t.prototype, "content", void 0), (t = e([n], t)), (i.default = t);