import { PREDEFINED_VIEWS_ID } from '../model';
function isCategoryPresets(presets) {
    return !!presets?.length && 'views' in presets[0];
}
export function presetsToCategories(presets) {
    return presets == null
        ? []
        : isCategoryPresets(presets)
            ? presets
            : [
                {
                    id: PREDEFINED_VIEWS_ID,
                    name: '',
                    views: presets,
                },
            ];
}
//# sourceMappingURL=presetsToCategories.js.map