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

  var _reporterNs, _cclegacy, _decorator, Component, Label, _dec, _class, _temp, _crd, ccclass, property, ServerListItem;

  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 _reportPossibleCrUseOfIGameServerInfo(extras) {
    _reporterNs.report("IGameServerInfo", "../../shared/gateClient/GameServer", _context.meta, extras);
  }

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

      _cclegacy._RF.push({}, "2b255CCQNJOCI5wN419AKF4", "ServerListItem", undefined);

      ({
        ccclass,
        property
      } = _decorator);

      _export("ServerListItem", ServerListItem = (_dec = ccclass('ServerInfo'), _dec(_class = (_temp = class ServerListItem extends Component {
        constructor(...args) {
          super(...args);

          _defineProperty(this, "serverInfo", void 0);

          _defineProperty(this, "onClick", void 0);
        }

        start() {
          var textComp = this.getComponent(Label);

          if (textComp) {
            var _this$serverInfo, _this$serverInfo2;

            textComp.string = `${(_this$serverInfo = this.serverInfo) === null || _this$serverInfo === void 0 ? void 0 : _this$serverInfo.serverName}  (${(_this$serverInfo2 = this.serverInfo) === null || _this$serverInfo2 === void 0 ? void 0 : _this$serverInfo2.clientCount}人在线)`;
          }
        }

        onclick() {
          var _this$onClick;

          (_this$onClick = this.onClick) === null || _this$onClick === void 0 ? void 0 : _this$onClick.call(this, this.serverInfo);
        }

      }, _temp)) || _class));

      _cclegacy._RF.pop();

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