"use strict";
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bond = void 0;
const Security_1 = require("../security/Security");
const RateStatus_1 = require("./RateStatus");
const InvalidRateStatus_1 = require("./error/InvalidRateStatus");
class Bond extends Security_1.Security {
    static checkRateStatus(value) {
        const errorList = [];
        const length = Object.keys(RateStatus_1.RateStatus).length;
        if (typeof value !== "number") {
            value = RateStatus_1.CastRateStatus.toNumber(value);
        }
        if (value >= length)
            errorList.push(new InvalidRateStatus_1.InvalidRateStatus(value));
        return errorList;
    }
}
exports.Bond = Bond;
