var t = require; var e = module; var i = exports; var 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; }, s = (this && this.__awaiter) || function(t, n, r, l) { return new(r = r || Promise)(function(i, e) { function s(t) { try { a(l.next(t)); } catch (t) { e(t); } } function o(t) { try { a(l.throw(t)); } catch (t) { e(t); } } function a(t) { var e; t.done ? i(t.value) : ((e = t.value) instanceof r ? e : new r(function(t) { t(e); }) ).then(s, o); } a((l = l.apply(t, n || [])).next()); }); }; Object.defineProperty(i, "__esModule", { value: !0 }), (i.AdRateBuffView = void 0); const o = t("App"), a = t("BaseView"), n = t("ControllerConst"), r = t("AdRewardConst"), { property: l, menu: h, ccclass: c } = cc._decorator; t = class extends a.default { constructor() { super(...arguments), (this.rateLab = null), (this.adTimeLab = null), (this.countDownTimeLab = null), (this.countDownBg = null), (this.redPoint = null), (this.aniNode = null), (this.bgType = 0), (this.isShowItem = !1); } initUI() { super.initUI(); } open() { super.open(); } updateUI(t, e) { (this.rateLab.string = `x${t}`), (this.adTimeLab.string = `+${Math.floor(e / 60)}M`); } updateTime(t) { var e = !!t; this.isShowItem != e && ((this.isShowItem = e), this.updateState()), (this.countDownTimeLab.string = o.default.DateUtils.getFormatBySecond(t, 10)); } updateState() { (this.countDownBg.active = this.isShowItem), (this.countDownTimeLab.node.active = this.isShowItem), (this.redPoint.active = !this.isShowItem), (this.aniNode.active = this.isShowItem); } onTouchBtn() { return s(this, void 0, void 0, function*() { yield o.default.ControllerManager.applyFunc(n.ControllerConst.AdReward, r.AdRewardConst.WATCH_AD_RATE_BUFF); }); } }; e([l(cc.Label)], t.prototype, "rateLab", void 0), e([l(cc.Label)], t.prototype, "adTimeLab", void 0), e([l(cc.Label)], t.prototype, "countDownTimeLab", void 0), e([l(cc.Node)], t.prototype, "countDownBg", void 0), e([l(cc.Node)], t.prototype, "redPoint", void 0), e([l(cc.Node)], t.prototype, "aniNode", void 0), (t = e([c], t)), (i.AdRateBuffView = t);