System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
  "use strict";

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, MsgHints, PlatformBrowser, _crd, ccclass, property;

  function _reportPossibleCrUseOfMsgHints(extras) {
    _reporterNs.report("MsgHints", "../scripts/core/utils/MsgHints", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      _decorator = _cc._decorator;
    }, function (_unresolved_2) {
      MsgHints = _unresolved_2.default;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "642c06JTxZCOYGq+F/jKDw1", "platformBrowser", undefined);

      __checkObsolete__(['_decorator']);

      ({
        ccclass,
        property
      } = _decorator);
      PlatformBrowser = class PlatformBrowser {
        constructor() {
          this.adInstance = null;
          this.gtag = null;
          this.openAd = true;
        }

        initialize() {
          this.adInstance = window['adInstance'];

          try {
            var _window$__woso, _window$__woso$TopCal;

            (_window$__woso = window["__woso"]) == null ? void 0 : (_window$__woso$TopCal = _window$__woso["TopCallback"]) == null ? void 0 : _window$__woso$TopCal.call(_window$__woso);
          } catch (error) {}

          console.log('web ads sdk初始化');
        }
        /**显示插屏广告*/


        showInterstitialAd(cb) {
          /*if(!constants.isRelease){
              console.log('模拟显示插屏广告回调');
              cb?.();
              return
          }*/
          try {
            window['showAd']('interstitial').then(() => {
              console.log("rewarded11111");
            }).catch(() => {
              console.log("rewarded22222"); // GtagMgr.inst.doGameDot(GtagType.ad_error);
            });
          } catch (error) {// tgxUITips.show('The ad failed to load')
          }
        }
        /** 显示激励广告*/


        showRewardVideo(cb) {
          // if(!constants.isRelease){
          //     console.log('模拟激励广告回调');
          //     cb?.(0);
          //     return
          // }
          try {
            window["showAd"]('rewarded').then(() => {
              (_crd && MsgHints === void 0 ? (_reportPossibleCrUseOfMsgHints({
                error: Error()
              }), MsgHints) : MsgHints).show('rewarded11111');
              if (cb) cb(0);
            }).catch(() => {
              (_crd && MsgHints === void 0 ? (_reportPossibleCrUseOfMsgHints({
                error: Error()
              }), MsgHints) : MsgHints).show('The ad failed to load'); //上报信息
              // GtagMgr.inst.doGameDot(GtagType.ad_error);
              // cb && cb();
            });
            return;
          } catch (error) {} //tgxUITips.show('The ads failed to load');

        }
        /** 显示激励广告*/


        hideBannerAd() {}

        showBannerAd() {}

        vibrateShort() {}

      };

      _export("default", new PlatformBrowser());

      _cclegacy._RF.pop();

      _crd = false;
    }
  };
});
//# sourceMappingURL=b01ab0231794d359477437fbd30010ec1e656b98.js.map