// Copyright 2023 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ContextInputType;
(function (ContextInputType) {
    /**
     * The context input type of a `CommitmentContextInput`.
     */
    ContextInputType[ContextInputType["COMMITMENT"] = 0] = "COMMITMENT";
    /**
     * The context input type of a `BlockIssuanceCreditContextInput`.
     */
    ContextInputType[ContextInputType["BLOCK_ISSUANCE_CREDIT"] = 1] = "BLOCK_ISSUANCE_CREDIT";
    /**
     * The context input type of a `RewardContextInput`.
     */
    ContextInputType[ContextInputType["REWARD"] = 2] = "REWARD";
})(ContextInputType || (ContextInputType = {}));
var ContextInput = /** @class */ (function () {
    function ContextInput(type) {
        this.type = type;
    }
    return ContextInput;
}());
/**
 * A Commitment Context Input references a commitment to a certain slot.
 */
var CommitmentContextInput = /** @class */ (function (_super) {
    __extends(CommitmentContextInput, _super);
    function CommitmentContextInput(commitmentId) {
        var _this = _super.call(this, ContextInputType.COMMITMENT) || this;
        _this.commitmentId = commitmentId;
        return _this;
    }
    return CommitmentContextInput;
}(ContextInput));
/**
 * A Block Issuance Credit (BIC) Context Input provides the VM with context for the value of
 * the BIC vector of a specific slot.
 */
var BlockIssuanceCreditContextInput = /** @class */ (function (_super) {
    __extends(BlockIssuanceCreditContextInput, _super);
    function BlockIssuanceCreditContextInput(accountId) {
        var _this = _super.call(this, ContextInputType.BLOCK_ISSUANCE_CREDIT) || this;
        _this.accountId = accountId;
        return _this;
    }
    return BlockIssuanceCreditContextInput;
}(ContextInput));
/**
 * A Reward Context Input indicates which transaction Input is claiming Mana rewards.
 */
var RewardContextInput = /** @class */ (function (_super) {
    __extends(RewardContextInput, _super);
    function RewardContextInput(index) {
        var _this = _super.call(this, ContextInputType.REWARD) || this;
        _this.index = index;
        return _this;
    }
    return RewardContextInput;
}(ContextInput));
var ContextInputDiscriminator = {
    property: 'type',
    subTypes: [
        {
            value: CommitmentContextInput,
            name: ContextInputType.COMMITMENT
        },
        {
            value: BlockIssuanceCreditContextInput,
            name: ContextInputType.BLOCK_ISSUANCE_CREDIT
        },
        { value: RewardContextInput, name: ContextInputType.REWARD },
    ]
};
export { ContextInputType, ContextInput, CommitmentContextInput, RewardContextInput, BlockIssuanceCreditContextInput, ContextInputDiscriminator, };
//# sourceMappingURL=context-input.js.map