"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("./utils");
var BinaryVoteResult;
(function (BinaryVoteResult) {
    BinaryVoteResult[BinaryVoteResult["None"] = 0] = "None";
    BinaryVoteResult[BinaryVoteResult["Yes"] = 1] = "Yes";
    BinaryVoteResult[BinaryVoteResult["No"] = 2] = "No";
})(BinaryVoteResult = exports.BinaryVoteResult || (exports.BinaryVoteResult = {}));
var SchemePermissions;
(function (SchemePermissions) {
    SchemePermissions[SchemePermissions["None"] = 0] = "None";
    /**
     * A scheme always automatically gets this bit when registered to a DAO
     */
    SchemePermissions[SchemePermissions["IsRegistered"] = 1] = "IsRegistered";
    SchemePermissions[SchemePermissions["CanRegisterSchemes"] = 2] = "CanRegisterSchemes";
    SchemePermissions[SchemePermissions["CanAddRemoveGlobalConstraints"] = 4] = "CanAddRemoveGlobalConstraints";
    SchemePermissions[SchemePermissions["CanUpgradeController"] = 8] = "CanUpgradeController";
    SchemePermissions[SchemePermissions["CanCallDelegateCall"] = 16] = "CanCallDelegateCall";
    SchemePermissions[SchemePermissions["All"] = 31] = "All";
})(SchemePermissions = exports.SchemePermissions || (exports.SchemePermissions = {}));
/* tslint:disable:no-bitwise */
/* tslint:disable:max-line-length */
/**
 * These are the permissions that are the minimum that each scheme must have to
 * be able to perform its full range of functionality.
 *
 * Note that '1' is always assigned to a scheme by the Controller when the
 * scheme is registered with the controller.
 */
var DefaultSchemePermissions;
(function (DefaultSchemePermissions) {
    DefaultSchemePermissions[DefaultSchemePermissions["NoPermissions"] = 0] = "NoPermissions";
    DefaultSchemePermissions[DefaultSchemePermissions["MinimumPermissions"] = 1] = "MinimumPermissions";
    DefaultSchemePermissions[DefaultSchemePermissions["AllPermissions"] = 31] = "AllPermissions";
    DefaultSchemePermissions[DefaultSchemePermissions["ContributionReward"] = 1] = "ContributionReward";
    DefaultSchemePermissions[DefaultSchemePermissions["GenesisProtocol"] = 1] = "GenesisProtocol";
    DefaultSchemePermissions[DefaultSchemePermissions["GlobalConstraintRegistrar"] = 5] = "GlobalConstraintRegistrar";
    /**
     * Has all permissions so that it can register/unregister all schemes
     */
    DefaultSchemePermissions[DefaultSchemePermissions["SchemeRegistrar"] = 31] = "SchemeRegistrar";
    DefaultSchemePermissions[DefaultSchemePermissions["UpgradeScheme"] = 11] = "UpgradeScheme";
    DefaultSchemePermissions[DefaultSchemePermissions["VestingScheme"] = 1] = "VestingScheme";
    DefaultSchemePermissions[DefaultSchemePermissions["VoteInOrganizationScheme"] = 17] = "VoteInOrganizationScheme";
})(DefaultSchemePermissions = exports.DefaultSchemePermissions || (exports.DefaultSchemePermissions = {}));
/* tslint:enable:no-bitwise */
/* tslint:enable:max-line-length */
/* tslint:disable:no-namespace */
(function (SchemePermissions) {
    function toString(perms) {
        return utils_1.Utils.numberToPermissionsString(perms);
    }
    SchemePermissions.toString = toString;
    function fromString(perms) {
        return utils_1.Utils.permissionsStringToNumber(perms);
    }
    SchemePermissions.fromString = fromString;
})(SchemePermissions = exports.SchemePermissions || (exports.SchemePermissions = {}));
//# sourceMappingURL=commonTypes.js.map