"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.isCreateArgs = exports.createArgs = exports.getCreateArgsSerializer = void 0;
const umi_1 = require("@metaplex-foundation/umi");
const serializers_1 = require("@metaplex-foundation/umi/serializers");
const _1 = require(".");
function getCreateArgsSerializer() {
    return (0, serializers_1.dataEnum)([
        [
            'V1',
            (0, serializers_1.mapSerializer)((0, serializers_1.struct)([
                ['name', (0, serializers_1.string)()],
                ['symbol', (0, serializers_1.string)()],
                ['uri', (0, serializers_1.string)()],
                ['sellerFeeBasisPoints', (0, umi_1.mapAmountSerializer)((0, serializers_1.u16)(), '%', 2)],
                ['creators', (0, serializers_1.option)((0, serializers_1.array)((0, _1.getCreatorSerializer)()))],
                ['primarySaleHappened', (0, serializers_1.bool)()],
                ['isMutable', (0, serializers_1.bool)()],
                ['tokenStandard', (0, _1.getTokenStandardSerializer)()],
                ['collection', (0, serializers_1.option)((0, _1.getCollectionSerializer)())],
                ['uses', (0, serializers_1.option)((0, _1.getUsesSerializer)())],
                ['collectionDetails', (0, serializers_1.option)((0, _1.getCollectionDetailsSerializer)())],
                ['ruleSet', (0, serializers_1.option)((0, serializers_1.publicKey)())],
                ['decimals', (0, serializers_1.option)((0, serializers_1.u8)())],
                ['printSupply', (0, serializers_1.option)((0, _1.getPrintSupplySerializer)())],
            ]), (value) => ({
                ...value,
                symbol: value.symbol ?? '',
                primarySaleHappened: value.primarySaleHappened ?? false,
                isMutable: value.isMutable ?? true,
                collection: value.collection ?? (0, umi_1.none)(),
                uses: value.uses ?? (0, umi_1.none)(),
                collectionDetails: value.collectionDetails ?? (0, umi_1.none)(),
                ruleSet: value.ruleSet ?? (0, umi_1.none)(),
                decimals: value.decimals ?? (0, umi_1.none)(),
                printSupply: value.printSupply ?? (0, umi_1.none)(),
            })),
        ],
    ], { description: 'CreateArgs' });
}
exports.getCreateArgsSerializer = getCreateArgsSerializer;
function createArgs(kind, data) {
    return Array.isArray(data)
        ? { __kind: kind, fields: data }
        : { __kind: kind, ...(data ?? {}) };
}
exports.createArgs = createArgs;
function isCreateArgs(kind, value) {
    return value.__kind === kind;
}
exports.isCreateArgs = isCreateArgs;
//# sourceMappingURL=createArgs.js.map