﻿Type.registerNamespace('ActiveBets');

/*******************  ActiveBets.Limit  ***********************/
ActiveBets.Limit = function() {
    this._MinPay = null;
    this._MaxPay = null;
    
    if (arguments.length > 0)
        this._ctor$0.apply(this, arguments);
}

ActiveBets.Limit.prototype = {
    _ctor$0: function() {
        this._MinPay = arguments[0];
        this._MaxPay = arguments[1];
    },

    get_min_pay: function() {
        return this._MinPay;
    },
    set_min_pay: function(value) {
        this._MinPay = value;
    },
    get_max_pay: function() {
        return this._MaxPay;
    },
    set_max_pay: function(value) {
        this._MaxPay = value;
    },

    to_string: function() {
        if (this.get_min_pay() == null && this.get_max_pay() == null)
            return Res.NoLimit;
        else if (this.get_min_pay() == null)
            return String.format('* - {0}', this.get_max_pay());
        else if (this.get_max_pay() == null)
            return String.format('{0} - *', this.get_min_pay());
        else
            return String.format('{0} - {1}', this.get_min_pay(), this.get_max_pay());
    }
}
ActiveBets.Limit.registerClass("ActiveBets.Limit");
Res={"OddNotExistsError":"Odd not exists.","FactorExceedError":"Odd factor exceeded.","NoLimit":"no lim","LimitError":"Limits: wrong stake","Bet":"Bet","Odd":"Odds","Bonus":"BONUS:","StandartExpress":"Standart express","EventRefundError":"Event refund.","WinExceedError":"Possible win exceeded.","FactorChangedError":"Factor changed.","EventBlockedError":"Event blocked.","EventStartedError":"Event started.","EventDateChangedError":"Event date changed.","Bets":"Bets"};
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();