/**
 * 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,
  getStructDecoder,
  getStructEncoder,
  getU32Decoder,
  getU32Encoder,
  type FixedSizeCodec,
  type FixedSizeDecoder,
  type FixedSizeEncoder,
} from "@solana/kit";

export type EmergencyDeletedRootBundle = { rootBundleId: number };

export type EmergencyDeletedRootBundleArgs = EmergencyDeletedRootBundle;

export function getEmergencyDeletedRootBundleEncoder(): FixedSizeEncoder<EmergencyDeletedRootBundleArgs> {
  return getStructEncoder([["rootBundleId", getU32Encoder()]]);
}

export function getEmergencyDeletedRootBundleDecoder(): FixedSizeDecoder<EmergencyDeletedRootBundle> {
  return getStructDecoder([["rootBundleId", getU32Decoder()]]);
}

export function getEmergencyDeletedRootBundleCodec(): FixedSizeCodec<
  EmergencyDeletedRootBundleArgs,
  EmergencyDeletedRootBundle
> {
  return combineCodec(
    getEmergencyDeletedRootBundleEncoder(),
    getEmergencyDeletedRootBundleDecoder(),
  );
}
