import { tokenBurnBeet } from '@metaplex-foundation/mpl-candy-guard';
import { createSerializerFromBeet, mapSerializer, token, } from '../../../types';
/** @internal */
export const tokenBurnGuardManifest = {
    name: 'tokenBurn',
    settingsBytes: 40,
    settingsSerializer: mapSerializer(createSerializerFromBeet(tokenBurnBeet), (settings) => (Object.assign(Object.assign({}, settings), { amount: token(settings.amount) })), (settings) => (Object.assign(Object.assign({}, settings), { amount: settings.amount.basisPoints }))),
    mintSettingsParser: ({ metaplex, settings, payer, programs }) => {
        const tokenAccount = metaplex.tokens().pdas().associatedTokenAccount({
            mint: settings.mint,
            owner: payer.publicKey,
            programs,
        });
        return {
            arguments: Buffer.from([]),
            remainingAccounts: [
                {
                    isSigner: false,
                    address: tokenAccount,
                    isWritable: true,
                },
                {
                    isSigner: false,
                    address: settings.mint,
                    isWritable: true,
                },
            ],
        };
    },
};
//# sourceMappingURL=tokenBurn.js.map