'use strict'; /** * Licensed Materials - Property of IBM * IBM Cognos Products: BI * (C) Copyright IBM Corp. 2018 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['../../../lib/@waca/dashboard-common/dist/core/Model', './customColors/CustomColorsModel', 'underscore'], function (Model, CustomColors, _) { var PropertiesModel = Model.extend({ nestedModels: { customColors: CustomColors }, whitelistAttrs: ['dashboardColorSet', 'customColors', 'localCache', 'defaultLocale', 'fredIsRed'], init: function init(model, options) { var _this = this; _.extend(this, options); if (model) { _.defaults(model, { customColors: {}, defaultLocale: 'Default', fredIsRed: true }); } PropertiesModel.inherited('init', this, arguments); if (this.contentReferences) { this.contentReferences.push({ type: 'palette', get: function get() { // We only want palettes that start with __CM__ to be added to the content references var value = _this.get('dashboardColorSet'); if (value && value.indexOf('__CM__') === 0) { return value.split('__CM__')[1]; } return null; } }); } } }); return PropertiesModel; }); //# sourceMappingURL=PropertiesModel.js.map