'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Licensed Materials - Property of IBM * IBM Business Analytics (C) Copyright IBM Corp. 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['./api/SegmentAPI', './api/impl/Segment', '../../../lib/@waca/dashboard-common/dist/core/APIFactory'], function (SegmentAPI, Segment, APIFactory) { var SegmentFeature = function () { function SegmentFeature(options) { _classCallCheck(this, SegmentFeature); this._options = options; } SegmentFeature.prototype.initialize = function initialize() { this._options.instrumentationSvc = this._options.dashboardApi.getGlassCoreSvc('.Instrumentation'); this._options.logger = this._options.dashboardApi.getGlassCoreSvc('.Logger'); if (this._options.instrumentationSvc.enabled) { this._api = APIFactory.createAPI(new Segment(this._options), [SegmentAPI]); } else { this._api = new SegmentAPI(); } return Promise.resolve(); }; SegmentFeature.prototype.getAPI = function getAPI() { return this._api; }; return SegmentFeature; }(); return SegmentFeature; }); //# sourceMappingURL=SegmentFeature.js.map