// SPDX-License-Identifier: Apache-2.0
export var DividendType;
(function (DividendType) {
    DividendType["NONE"] = "NONE";
    DividendType["PREFERRED"] = "PREFERRED";
    DividendType["COMMON"] = "COMMON";
})(DividendType || (DividendType = {}));
export class CastDividendType {
    static fromNumber(id) {
        if (id == 0)
            return DividendType.NONE;
        if (id == 1)
            return DividendType.PREFERRED;
        return DividendType.COMMON;
    }
    static fromBigint(id) {
        return this.fromNumber(Number(id));
    }
    static toNumber(value) {
        if (value == DividendType.NONE)
            return 0;
        if (value == DividendType.PREFERRED)
            return 1;
        return 2;
    }
}
