var t = require; var e = module; var i = exports; var o, 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("ListView"), { ccclass: s, property: n, menu: r } = cc._decorator; t = o = class extends cc.Component { constructor() { super(...arguments), (this.data = null), (this.recycled = !1), (this.nodeSelected = null), (this.nodeUnselected = null), (this.nodeDisableSelected = null); } onSelected() { this.nodeSelected && (this.nodeSelected.active = !0), this.nodeUnselected && (this.nodeUnselected.active = !1); } isSelected() { return this.listView.selectedItems.include(this.data); } onClickSelected() { this.onSelected(); } onCancelSelected() { this.onUnselected(); } onUnselected() { this.nodeSelected && (this.nodeSelected.active = !1), this.nodeUnselected && (this.nodeUnselected.active = !0); } onEnableSelect() { this.nodeDisableSelected && (this.nodeDisableSelected.active = !1); } onDisableSelect() { this.nodeDisableSelected && (this.nodeDisableSelected.active = !0); } onDestroy() {} dataChanged(t) {} setData(e, t = !1) { var i, s = this; (this.data && this.data === e && !t && !this.recycled) || ((i = this.data), (this.data = e), this.dataChanged(i), 1 < (t = this.getComponents(o)).length && t.forEach(function(t) { t != s && ((t.data = e), t.dataChanged(i)); })), this.listView && this.listView.node.emit(a.ListViewEvent.ITEM_DATA_CHANGED, this); } reportItemTapped() { this.listView ? this.listView.onItemTap(this) : this.node.emit(a.ListViewEvent.ITEM_TAP, this.data); } checkSelect(t) { return !0; } }; e([n(cc.Node)], t.prototype, "nodeSelected", void 0), e([n(cc.Node)], t.prototype, "nodeUnselected", void 0), e([n(cc.Node)], t.prototype, "nodeDisableSelected", void 0), (t = o = e([s], t)), (i.default = t = o);