"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flattenPreset = void 0;
const types_1 = require("../types.js");
const flattenPreset = (config) => {
    return config.flat().reduce((acc, item) => {
        if (item.type === types_1.ToolbarDataType.ListButton && Array.isArray(item.data)) {
            return acc.concat(item.data);
        }
        acc.push(item);
        return acc;
    }, []);
};
exports.flattenPreset = flattenPreset;
//# sourceMappingURL=flattenPreset.js.map
