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

  var _reporterNs, _cclegacy, _decorator, OTWFlagComponent, _dec, _class, _temp, _crd, ccclass, property, OTWAreaFlagComponent;

  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  function _reportPossibleCrUseOfOTWAreaData(extras) {
    _reporterNs.report("OTWAreaData", "../Data/OTWAreaData", _context.meta, extras);
  }

  function _reportPossibleCrUseOfOTWFlagComponent(extras) {
    _reporterNs.report("OTWFlagComponent", "./OTWFlagComponent", _context.meta, extras);
  }

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

      _cclegacy._RF.push({}, "30f78rjjU5OVYKInDHarYcz", "OTWAreaFlagComponent", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("OTWAreaFlagComponent", OTWAreaFlagComponent = (_dec = ccclass('OTWAreaFlagComponent'), _dec(_class = (_temp = class OTWAreaFlagComponent extends (_crd && OTWFlagComponent === void 0 ? (_reportPossibleCrUseOfOTWFlagComponent({
        error: Error()
      }), OTWFlagComponent) : OTWFlagComponent) {
        constructor(...args) {
          super(...args);

          _defineProperty(this, "areaInfo", null);
        }

        onDestroy() {
          this.areaInfo = null;
        }

        updateShow() {
          var _this$getGameData$map;

          if (!this.areaInfo) return;
          super.updateShow();
          var area = (_this$getGameData$map = this.getGameData().map) === null || _this$getGameData$map === void 0 ? void 0 : _this$getGameData$map.allArea[this.areaInfo.area.areaIndex];

          if (area) {
            this.Text.string += ` ${area.troopsCurr}`;
          }
        }

      }, _temp)) || _class));

      _cclegacy._RF.pop();

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