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

  var _reporterNs, _cclegacy, GameClient, GateClient, HttpClient, WsClient, _crd;

  function _reportPossibleCrUseOfGameClient(extras) {
    _reporterNs.report("GameClient", "../shared/gameClient/gameClient", _context.meta, extras);
  }

  function _reportPossibleCrUseOfGateClient(extras) {
    _reporterNs.report("GateClient", "../shared/gateClient/gateClient", _context.meta, extras);
  }

  function _reportPossibleCrUseOfHttpClient(extras) {
    _reporterNs.report("HttpClient", "tsrpc-browser", _context.meta, extras);
  }

  function _reportPossibleCrUseOfWsClient(extras) {
    _reporterNs.report("WsClient", "tsrpc-browser", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
    }, function (_unresolved_2) {
      GameClient = _unresolved_2.GameClient;
    }, function (_unresolved_3) {
      GateClient = _unresolved_3.GateClient;
    }, function (_tsrpcBrowser) {
      HttpClient = _tsrpcBrowser.HttpClient;
      WsClient = _tsrpcBrowser.WsClient;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "35fe4vLukxCKKnwfyoskGwT", "env", undefined);

      /// #endif
      globalThis.getGateClient = gateServerUrl => {
        return new (_crd && GateClient === void 0 ? (_reportPossibleCrUseOfGateClient({
          error: Error()
        }), GateClient) : GateClient)((proto, opt) => {
          return new (_crd && HttpClient === void 0 ? (_reportPossibleCrUseOfHttpClient({
            error: Error()
          }), HttpClient) : HttpClient)(proto, opt);
        }, gateServerUrl);
      };

      globalThis.getGameClient = serverUrl => {
        return new (_crd && GameClient === void 0 ? (_reportPossibleCrUseOfGameClient({
          error: Error()
        }), GameClient) : GameClient)((proto, opt) => {
          return new (_crd && WsClient === void 0 ? (_reportPossibleCrUseOfWsClient({
            error: Error()
          }), WsClient) : WsClient)(proto, opt);
        }, serverUrl);
      };

      _cclegacy._RF.pop();

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