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

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

  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 _reportPossibleCrUseOfOTWTroopData(extras) {
    _reporterNs.report("OTWTroopData", "../Data/OTWTroopData", _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({}, "8460biqeM9CdK9DO8O607OS", "OTWTroopFlagComponent", undefined);

      ({
        ccclass,
        property
      } = _decorator);

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

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

        onDestroy() {
          this.troopInfo = null;
        }

        updateShow() {
          var _this$getGameData$map;

          if (!this.troopInfo) return;
          var troop = (_this$getGameData$map = this.getGameData().map) === null || _this$getGameData$map === void 0 ? void 0 : _this$getGameData$map.allAttackingTroop[this.troopInfo.troop.troopIndex];

          if (troop) {
            this.Text.string = ` ${troop.troopsCount}`;
          }
        }

      }, _temp)) || _class));

      _cclegacy._RF.pop();

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