"use strict";

exports.__esModule = true;
exports.presetsToCategories = presetsToCategories;
var _model = require("../model");
function isCategoryPresets(presets) {
  return !!(presets != null && presets.length) && 'views' in presets[0];
}
function presetsToCategories(presets) {
  return presets == null ? [] : isCategoryPresets(presets) ? presets : [{
    id: _model.PREDEFINED_VIEWS_ID,
    name: '',
    views: presets
  }];
}
//# sourceMappingURL=presetsToCategories.js.map