"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AMOUNT = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__BURN_AMOUNT_EXCEEDED = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_CONTROLLER = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_PAUSER = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_LOCAL_TOKEN_STATE = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_PAIR_STATE = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__PROGRAM_PAUSED = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_MINTER_STATE = exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AUTHORITY = void 0;
exports.getTokenMessengerMinterV2ErrorMessage = getTokenMessengerMinterV2ErrorMessage;
exports.isTokenMessengerMinterV2Error = isTokenMessengerMinterV2Error;
var kit_1 = require("@solana/kit");
var programs_1 = require("../programs");
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AUTHORITY = 0x1770;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_MINTER_STATE = 0x1771;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__PROGRAM_PAUSED = 0x1772;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_PAIR_STATE = 0x1773;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_LOCAL_TOKEN_STATE = 0x1774;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_PAUSER = 0x1775;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_CONTROLLER = 0x1776;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__BURN_AMOUNT_EXCEEDED = 0x1777;
exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AMOUNT = 0x1778;
var tokenMessengerMinterV2ErrorMessages;
if (process.env.NODE_ENV !== "production") {
    tokenMessengerMinterV2ErrorMessages = (_a = {},
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__BURN_AMOUNT_EXCEEDED] = "Burn amount exceeded",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AMOUNT] = "Invalid amount",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_AUTHORITY] = "Invalid authority",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_LOCAL_TOKEN_STATE] = "Invalid local token state",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_PAUSER] = "Invalid pauser",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_CONTROLLER] = "Invalid token controller",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_MINTER_STATE] = "Invalid token minter state",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__INVALID_TOKEN_PAIR_STATE] = "Invalid token pair state",
        _a[exports.TOKEN_MESSENGER_MINTER_V2_ERROR__PROGRAM_PAUSED] = "Instruction is not allowed at this time",
        _a);
}
function getTokenMessengerMinterV2ErrorMessage(code) {
    if (process.env.NODE_ENV !== "production") {
        return tokenMessengerMinterV2ErrorMessages[code];
    }
    return "Error message not available in production bundles.";
}
function isTokenMessengerMinterV2Error(error, transactionMessage, code) {
    return (0, kit_1.isProgramError)(error, transactionMessage, programs_1.TOKEN_MESSENGER_MINTER_V2_PROGRAM_ADDRESS, code);
}
//# sourceMappingURL=tokenMessengerMinterV2.js.map