/**
 * 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 GlobalConfigOption { EmergencyMode, BlockDeposit, BlockInvest, BlockWithdraw, BlockCollectFees, BlockCollectRewards, BlockSwapRewards, BlockSwapUnevenVaults, WithdrawalFeeBps, DeprecatedSwapDiscountBps, ActionsAuthority, DeprecatedTreasuryFeeVaults, AdminAuthority, BlockEmergencySwap, BlockLocalAdmin, UpdateTokenInfos, ScopeProgramId, UpdateScopePriceId, MinPerformanceFeeBps, MinSwapUnevenSlippageToleranceBps, MinReferencePriceSlippageToleranceBps, ActionsAfterRebalanceDelaySeconds, TreasuryFeeVaultReceiver, AddScopePriceId, MaxDeviationFromRefPriceOnInvestBps, InvestCooldownSlots, MinInvestTriggerValueUsd };

export type GlobalConfigOptionArgs = GlobalConfigOption;

export function getGlobalConfigOptionEncoder(): FixedSizeEncoder<GlobalConfigOptionArgs> {
    return getEnumEncoder(GlobalConfigOption);
}

export function getGlobalConfigOptionDecoder(): FixedSizeDecoder<GlobalConfigOption> {
    return getEnumDecoder(GlobalConfigOption);
}

export function getGlobalConfigOptionCodec(): FixedSizeCodec<GlobalConfigOptionArgs, GlobalConfigOption> {
    return combineCodec(getGlobalConfigOptionEncoder(), getGlobalConfigOptionDecoder());
}