"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameModel_1 = require("../common/GameModel");
var DataManager_1 = require("./../../manager/DataManager");
var TwLang_1 = require("../../util/TwLang");
var GFun_1 = require("../../../tc/util/GFun");
// import { IUserData } from '../../data/game/common/IUserData';
var GameRealTimeRankModel = (function (_super) {
    __extends(GameRealTimeRankModel, _super);
    function GameRealTimeRankModel() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 我得排行文案
     * @param inRankStr
     * @param unitName 单位
     * @param outRankStr
     */
    GameRealTimeRankModel.prototype.getRankTxt = function (inRankStr, unitName, outRankStr) {
        if (inRankStr === void 0) { inRankStr = TwLang_1.TwLang.lang_015; }
        if (unitName === void 0) { unitName = TwLang_1.TwLang.lang_016; }
        if (outRankStr === void 0) { outRankStr = TwLang_1.TwLang.lang_014; }
        var str;
        if (DataManager_1.DataManager.ins.realTimeRankData.myUserData && DataManager_1.DataManager.ins.realTimeRankData.myUserData.rank) {
            str = GFun_1.GFun.replace(inRankStr, [DataManager_1.DataManager.ins.realTimeRankData.myUserData.maxScore, unitName, DataManager_1.DataManager.ins.realTimeRankData.myUserData.rank]);
        }
        else {
            str = outRankStr;
        }
        return str;
    };
    Object.defineProperty(GameRealTimeRankModel.prototype, "userList", {
        /**
         * 用户列表
         */
        get: function () {
            return DataManager_1.DataManager.ins.realTimeRankData.userList;
        },
        enumerable: true,
        configurable: true
    });
    return GameRealTimeRankModel;
}(GameModel_1.GameModel));
exports.GameRealTimeRankModel = GameRealTimeRankModel;
__reflect(GameRealTimeRankModel.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/newGame/saolei19.03.06/db-game-template/egret/libs/tw/model/game/GameRealTimeRankModel\".GameRealTimeRankModel");
//# sourceMappingURL=GameRealTimeRankModel.js.map