// SPDX-License-Identifier: Apache-2.0
import { Security } from "../security/Security";
import { CastDividendType, DividendType } from "./DividendType";
import { InvalidDividendType } from "./error/InvalidDividendType";
export class Equity extends Security {
    static checkDividend(value) {
        const errorList = [];
        const length = Object.keys(DividendType).length;
        if (typeof value !== "number") {
            value = CastDividendType.toNumber(value);
        }
        if (value >= length)
            errorList.push(new InvalidDividendType(value));
        return errorList;
    }
}
