"use strict";
/**
 * This code was AUTOGENERATED using the kinobi library.
 * Please DO NOT EDIT THIS FILE, instead use visitors
 * to add features, then rerun kinobi to update it.
 *
 * @see https://github.com/metaplex-foundation/kinobi
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSplAddressLookupTableErrorFromName = exports.getSplAddressLookupTableErrorFromCode = void 0;
const codeToErrorMap = new Map();
const nameToErrorMap = new Map();
/**
 * Attempts to resolve a custom program error from the provided error code.
 * @category Errors
 */
function getSplAddressLookupTableErrorFromCode(code, program, cause) {
    const constructor = codeToErrorMap.get(code);
    return constructor ? new constructor(program, cause) : null;
}
exports.getSplAddressLookupTableErrorFromCode = getSplAddressLookupTableErrorFromCode;
/**
 * Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.
 * @category Errors
 */
function getSplAddressLookupTableErrorFromName(name, program, cause) {
    const constructor = nameToErrorMap.get(name);
    return constructor ? new constructor(program, cause) : null;
}
exports.getSplAddressLookupTableErrorFromName = getSplAddressLookupTableErrorFromName;
//# sourceMappingURL=splAddressLookupTable.js.map