import { fg } from '@atlaskit/platform-feature-flags';
import { getDatasourceType } from './getDatasourceType';
export var canRenderDatasource = function canRenderDatasource(datasourceId) {
  var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var datasourceType = getDatasourceType(datasourceId);
  switch (datasourceType) {
    case 'jira':
      return true;
    case 'assets':
      if (fg('linking_platform_datasource_assets_objects')) {
        return true;
      }
      return false;
    default:
      return defaultValue;
  }
};
// eslint-disable-next-line @atlaskit/editor/no-re-export
export { getDatasourceType } from './getDatasourceType';