"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.canRenderDatasource = void 0;
Object.defineProperty(exports, "getDatasourceType", {
  enumerable: true,
  get: function get() {
    return _getDatasourceType.getDatasourceType;
  }
});
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var _getDatasourceType = require("./getDatasourceType");
var canRenderDatasource = exports.canRenderDatasource = function canRenderDatasource(datasourceId) {
  var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var datasourceType = (0, _getDatasourceType.getDatasourceType)(datasourceId);
  switch (datasourceType) {
    case 'jira':
      return true;
    case 'assets':
      if ((0, _platformFeatureFlags.fg)('linking_platform_datasource_assets_objects')) {
        return true;
      }
      return false;
    default:
      return defaultValue;
  }
};
// eslint-disable-next-line @atlaskit/editor/no-re-export