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

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, instantiate, isValid, Node, Prefab, resources, DataMgr, LogMgr, ResManger, _dec, _dec2, _class, _class2, _descriptor, _crd, ccclass, property, game;

  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }

  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }

  function _reportPossibleCrUseOfDataMgr(extras) {
    _reporterNs.report("DataMgr", "./Manager/DataMgr", _context.meta, extras);
  }

  function _reportPossibleCrUseOfLogMgr(extras) {
    _reporterNs.report("LogMgr", "./Manager/LogMgr", _context.meta, extras);
  }

  function _reportPossibleCrUseOfResManger(extras) {
    _reporterNs.report("ResManger", "./Manager/ResManger", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      _decorator = _cc._decorator;
      Component = _cc.Component;
      instantiate = _cc.instantiate;
      isValid = _cc.isValid;
      Node = _cc.Node;
      Prefab = _cc.Prefab;
      resources = _cc.resources;
    }, function (_unresolved_2) {
      DataMgr = _unresolved_2.default;
    }, function (_unresolved_3) {
      LogMgr = _unresolved_3.default;
    }, function (_unresolved_4) {
      ResManger = _unresolved_4.default;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "adca9UtYZ1I/Jc8ralx6fsv", "game", undefined);

      __checkObsolete__(['_decorator', 'Component', 'instantiate', 'isValid', 'Node', 'Prefab', 'resources']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("game", game = (_dec = ccclass('game'), _dec2 = property(Node), _dec(_class = (_class2 = class game extends Component {
        constructor() {
          super(...arguments);

          _initializerDefineProperty(this, "pageParent", _descriptor, this);
        }

        onLoad() {
          (_crd && DataMgr === void 0 ? (_reportPossibleCrUseOfDataMgr({
            error: Error()
          }), DataMgr) : DataMgr).initMineInfo();
          (_crd && ResManger === void 0 ? (_reportPossibleCrUseOfResManger({
            error: Error()
          }), ResManger) : ResManger).init();
        }

        openMine() {
          var mineInfo = (_crd && DataMgr === void 0 ? (_reportPossibleCrUseOfDataMgr({
            error: Error()
          }), DataMgr) : DataMgr).getMineInfo();
          this.showPage("MinePage", mineInfo.tileArr);
        }

        openYour() {
          var mineInfo = (_crd && DataMgr === void 0 ? (_reportPossibleCrUseOfDataMgr({
            error: Error()
          }), DataMgr) : DataMgr).getMineInfo();
          this.showPage("MinePage2", mineInfo.tileArr);
        }

        showPage(pageName, params) {
          var prefab = this.pageParent.getChildByName(pageName);

          if (isValid(prefab)) {
            prefab.active = true;
            var pageCom = prefab.getComponent(pageName);

            if (isValid(pageCom) && pageCom['init']) {
              pageCom['init'](params);
              return;
            }
          }

          resources.load("page/" + pageName, Prefab, (error, Prefab) => {
            if (error) {
              (_crd && LogMgr === void 0 ? (_reportPossibleCrUseOfLogMgr({
                error: Error()
              }), LogMgr) : LogMgr).error("showPage,load page:" + pageName + " err:" + error);
              return;
            }

            var prefabNode = instantiate(Prefab);
            prefabNode.parent = this.pageParent;
            var pageCom = prefabNode.getComponent(pageName);

            if (isValid(pageCom) && pageCom['init']) {
              pageCom['init'](params);
            }
          });
        }

        update(deltaTime) {}

      }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "pageParent", [_dec2], {
        configurable: true,
        enumerable: true,
        writable: true,
        initializer: function initializer() {
          return null;
        }
      })), _class2)) || _class));

      _cclegacy._RF.pop();

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