/**
 * This code was AUTOGENERATED using the Codama library.
 * Please DO NOT EDIT THIS FILE, instead use visitors
 * to add features, then rerun Codama to update it.
 *
 * @see https://github.com/codama-idl/codama
 */

import {
  combineCodec,
  getEnumDecoder,
  getEnumEncoder,
  type FixedSizeCodec,
  type FixedSizeDecoder,
  type FixedSizeEncoder,
} from "@solana/kit";

export enum TokenMinterError {
  InvalidAuthority,
  InvalidTokenMinterState,
  ProgramPaused,
  InvalidTokenPairState,
  InvalidLocalTokenState,
  InvalidPauser,
  InvalidTokenController,
  BurnAmountExceeded,
  InvalidAmount,
}

export type TokenMinterErrorArgs = TokenMinterError;

export function getTokenMinterErrorEncoder(): FixedSizeEncoder<TokenMinterErrorArgs> {
  return getEnumEncoder(TokenMinterError);
}

export function getTokenMinterErrorDecoder(): FixedSizeDecoder<TokenMinterError> {
  return getEnumDecoder(TokenMinterError);
}

export function getTokenMinterErrorCodec(): FixedSizeCodec<
  TokenMinterErrorArgs,
  TokenMinterError
> {
  return combineCodec(
    getTokenMinterErrorEncoder(),
    getTokenMinterErrorDecoder(),
  );
}
