"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.isCollectionDetailsToggle = exports.collectionDetailsToggle = exports.getCollectionDetailsToggleSerializer = void 0;
const serializers_1 = require("@metaplex-foundation/umi/serializers");
const _1 = require(".");
function getCollectionDetailsToggleSerializer() {
    return (0, serializers_1.dataEnum)([
        ['None', (0, serializers_1.unit)()],
        ['Clear', (0, serializers_1.unit)()],
        [
            'Set',
            (0, serializers_1.struct)([
                ['fields', (0, serializers_1.tuple)([(0, _1.getCollectionDetailsSerializer)()])],
            ]),
        ],
    ], { description: 'CollectionDetailsToggle' });
}
exports.getCollectionDetailsToggleSerializer = getCollectionDetailsToggleSerializer;
function collectionDetailsToggle(kind, data) {
    return Array.isArray(data)
        ? { __kind: kind, fields: data }
        : { __kind: kind, ...(data ?? {}) };
}
exports.collectionDetailsToggle = collectionDetailsToggle;
function isCollectionDetailsToggle(kind, value) {
    return value.__kind === kind;
}
exports.isCollectionDetailsToggle = isCollectionDetailsToggle;
//# sourceMappingURL=collectionDetailsToggle.js.map