"use strict";
// SPDX-License-Identifier: Apache-2.0
Object.defineProperty(exports, "__esModule", { value: true });
exports.CastDividendType = exports.DividendType = void 0;
var DividendType;
(function (DividendType) {
    DividendType["NONE"] = "NONE";
    DividendType["PREFERRED"] = "PREFERRED";
    DividendType["COMMON"] = "COMMON";
})(DividendType || (exports.DividendType = DividendType = {}));
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;
    }
}
exports.CastDividendType = CastDividendType;
