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("App"), o = t("SwitchFrame"), a = (t("ViewConst"), t("HelperCatService")), {ccclass: n, property: r} = cc._decorator; t = class extends cc.Component { constructor() { super(...arguments), (this.timeLab = null), (this.icon = null), (this.define = null), (this.saveData = null); } onLoad() { (this.define = s.default.ConfigManager.getConfig("Define")), (this.saveData = a.default.ins.saveData); } onEnable() { s.default.TimerManager.doTimer(1e3, 0, this.routine, this), this.routine(); } onDisable() { s.default.TimerManager.remove(this.routine, this); } routine() { var t = a.default.ins.getState(); t === a.HelperCatState.READY ? ((this.icon.node.y = 0), (this.timeLab.node.parent.active = !1), this.icon.switch(0), (this.timeLab.string = "")) : t === a.HelperCatState.CD ? ((this.timeLab.node.parent.active = !0), this.icon.switch(0), (this.timeLab.string = s.default.DateUtils.getFormatBySecond(a.default.ins.getCatLeftCDTime() / 1e3, 10))) : t === a.HelperCatState.WORKING && ((this.timeLab.node.parent.active = !0), this.icon.switch(1), (this.timeLab.string = s.default.DateUtils.getFormatBySecond(a.default.ins.getCatLeftTime() / 1e3, 10))); } onTouchBtn() { var t = a.default.ins.getState(); t === a.HelperCatState.READY ? s.default.ViewManager.open(43) : (t !== a.HelperCatState.CD && t !== a.HelperCatState.WORKING) || s.default.ViewManager.open(42); } }; e([r(cc.Label)], t.prototype, "timeLab", void 0), e([r(o.default)], t.prototype, "icon", void 0), (t = e([n], t)), (i.default = t);