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

  var _reporterNs, _cclegacy, _decorator, Component, instantiate, Collider, PHY_GROUP, OTWAreaFlagComponent, _dec, _class, _crd, ccclass, property, OTWAreaComponent;

  function _reportPossibleCrUseOfIArea(extras) {
    _reporterNs.report("IArea", "../../shared/gameClient/games/OccupationTheWarModels", _context.meta, extras);
  }

  function _reportPossibleCrUseOfIMap(extras) {
    _reporterNs.report("IMap", "../../shared/gameClient/games/OccupationTheWarModels", _context.meta, extras);
  }

  function _reportPossibleCrUseOfPHY_GROUP(extras) {
    _reporterNs.report("PHY_GROUP", "./Const", _context.meta, extras);
  }

  function _reportPossibleCrUseOfOTWAreaFlagComponent(extras) {
    _reporterNs.report("OTWAreaFlagComponent", "./OTWAreaFlagComponent", _context.meta, extras);
  }

  function _reportPossibleCrUseOfOTWAreaInfo(extras) {
    _reporterNs.report("OTWAreaInfo", "./OTWAreaInfo", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      _decorator = _cc._decorator;
      Component = _cc.Component;
      instantiate = _cc.instantiate;
      Collider = _cc.Collider;
    }, function (_unresolved_2) {
      PHY_GROUP = _unresolved_2.PHY_GROUP;
    }, function (_unresolved_3) {
      OTWAreaFlagComponent = _unresolved_3.OTWAreaFlagComponent;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "52151P1G3lDQ5Xcv7xUCDCZ", "OTWAreaComponent", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("OTWAreaComponent", OTWAreaComponent = (_dec = ccclass('OTWAreaComponent'), _dec(_class = class OTWAreaComponent extends Component {
        start() {
          var collider = this.getComponent(Collider);
          collider === null || collider === void 0 ? void 0 : collider.setGroup((_crd && PHY_GROUP === void 0 ? (_reportPossibleCrUseOfPHY_GROUP({
            error: Error()
          }), PHY_GROUP) : PHY_GROUP).Area);
          collider === null || collider === void 0 ? void 0 : collider.setMask(0xffffffff);
        }

        static createNode(areaPrefab, areaFlagPrefab, getMap, area, mainCamera, gameMgrNode, gameFlagUIWrapNode, gameObjWrapNode) {
          var node = instantiate(areaPrefab);
          node.name = "Area_" + area.areaIndex;
          var flag = (_crd && OTWAreaFlagComponent === void 0 ? (_reportPossibleCrUseOfOTWAreaFlagComponent({
            error: Error()
          }), OTWAreaFlagComponent) : OTWAreaFlagComponent).createFlagNode(getMap, area, areaFlagPrefab, node, mainCamera, gameMgrNode, "onAreaFlagUIUpdate");
          gameFlagUIWrapNode.addChild(flag);
          var areaComp = node.getComponent(OTWAreaComponent);
          areaComp.areaIndex = area.areaIndex;
          node.setPosition(area.x, 0, area.z);
          gameObjWrapNode.addChild(node);
          return {
            areaIndex: area.areaIndex,
            areaNode: node,
            flagNode: flag,
            flagComp: flag.getComponent(_crd && OTWAreaFlagComponent === void 0 ? (_reportPossibleCrUseOfOTWAreaFlagComponent({
              error: Error()
            }), OTWAreaFlagComponent) : OTWAreaFlagComponent)
          };
        }

      }) || _class));

      _cclegacy._RF.pop();

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