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

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, sys, PlatformWX, PlatformTT, PlatformBrowser, PlatformDefault, PlatformSystem, _crd;

  function _reportPossibleCrUseOfPlatformWX(extras) {
    _reporterNs.report("PlatformWX", "./platformWX", _context.meta, extras);
  }

  function _reportPossibleCrUseOfPlatformTT(extras) {
    _reporterNs.report("PlatformTT", "./platformTT", _context.meta, extras);
  }

  function _reportPossibleCrUseOfPlatformBrowser(extras) {
    _reporterNs.report("PlatformBrowser", "./platformBrowser", _context.meta, extras);
  }

  function _reportPossibleCrUseOfPlatformDefault(extras) {
    _reporterNs.report("PlatformDefault", "./platformDefault", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      sys = _cc.sys;
    }, function (_unresolved_2) {
      PlatformWX = _unresolved_2.default;
    }, function (_unresolved_3) {
      PlatformTT = _unresolved_3.default;
    }, function (_unresolved_4) {
      PlatformBrowser = _unresolved_4.default;
    }, function (_unresolved_5) {
      PlatformDefault = _unresolved_5.default;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "f35f0aO/J1PuqeE2EPiQSsv", "platformSystem", undefined);

      __checkObsolete__(['_decorator', 'sys']);

      PlatformSystem = class PlatformSystem {
        constructor() {
          this._platformWX = _crd && PlatformWX === void 0 ? (_reportPossibleCrUseOfPlatformWX({
            error: Error()
          }), PlatformWX) : PlatformWX;
          this._platformTT = _crd && PlatformTT === void 0 ? (_reportPossibleCrUseOfPlatformTT({
            error: Error()
          }), PlatformTT) : PlatformTT;
          this._platformBrowser = _crd && PlatformBrowser === void 0 ? (_reportPossibleCrUseOfPlatformBrowser({
            error: Error()
          }), PlatformBrowser) : PlatformBrowser;
          this._platformDefault = _crd && PlatformDefault === void 0 ? (_reportPossibleCrUseOfPlatformDefault({
            error: Error()
          }), PlatformDefault) : PlatformDefault;
        }

        get platform() {
          switch (sys.platform) {
            //微信小游戏
            case sys.Platform.WECHAT_GAME:
              return this._platformWX;
              break;
            //抖音小游戏

            case sys.Platform.BYTEDANCE_MINI_GAME:
              return this._platformTT;
              break;
            //手机浏览器或者web浏览器

            case sys.Platform.MOBILE_BROWSER:
            case sys.Platform.DESKTOP_BROWSER:
              return this._platformBrowser;
            //测试用

            default:
              return this._platformDefault;
              break;
          }
        }

        initialize() {
          switch (sys.platform) {
            //微信小游戏
            case sys.Platform.WECHAT_GAME:
              this._platformWX.initialize();

              break;
            //抖音字节

            case sys.Platform.BYTEDANCE_MINI_GAME:
              this._platformTT.initialize();

              break;
            //手机浏览器 web浏览器

            case sys.Platform.MOBILE_BROWSER:
            case sys.Platform.DESKTOP_BROWSER:
              this._platformBrowser.initialize();

              break;
            //测试用

            default:
              this._platformDefault.initialize();

              break;
          }
        }

      };

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

      _cclegacy._RF.pop();

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