You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
639 B

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var shared = require('@vue/shared');
const flattenOptions = (options) => {
const flattened = [];
options.map((option) => {
if (shared.isArray(option.options)) {
flattened.push({
label: option.label,
isTitle: true,
type: "Group"
});
option.options.forEach((o) => {
flattened.push(o);
});
flattened.push({
type: "Group"
});
} else {
flattened.push(option);
}
});
return flattened;
};
exports.flattenOptions = flattenOptions;
//# sourceMappingURL=util.js.map