"use strict";
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.Equity = void 0;
const Security_1 = require("../security/Security");
const DividendType_1 = require("./DividendType");
const InvalidDividendType_1 = require("./error/InvalidDividendType");
class Equity extends Security_1.Security {
    static checkDividend(value) {
        const errorList = [];
        const length = Object.keys(DividendType_1.DividendType).length;
        if (typeof value !== "number") {
            value = DividendType_1.CastDividendType.toNumber(value);
        }
        if (value >= length)
            errorList.push(new InvalidDividendType_1.InvalidDividendType(value));
        return errorList;
    }
}
exports.Equity = Equity;
