/**
 * This file is used to share internal grafana/runtime code with Grafana core.
 * Note that these exports are also used within Enterprise.
 *
 * Through the exports declared in package.json we can import this code in core Grafana and the grafana/runtime
 * package will continue to be able to access all code when it's published to npm as it's private to the package.
 *
 * During the yarn pack lifecycle the exports[./internal] property is deleted from the package.json
 * preventing the code from being importable by plugins or other npm packages making it truly "internal".
 *
 */

export { setPanelDataErrorView } from '../components/PanelDataErrorView';
export { setPanelRenderer } from '../components/PanelRenderer';
export { type PageInfoItem, setPluginPage } from '../components/PluginPage';

export { ExpressionDatasourceRef } from '../utils/DataSourceWithBackend';
export { standardStreamOptionsProvider, toStreamingDataResponse } from '../utils/DataSourceWithBackend';

export {
  setGetObservablePluginComponents,
  type GetObservablePluginComponents,
} from '../services/pluginExtensions/getObservablePluginComponents';
export {
  setGetObservablePluginLinks,
  type GetObservablePluginLinks,
} from '../services/pluginExtensions/getObservablePluginLinks';

export { UserStorage, useUserStorage } from '../utils/userStorage';

export { initOpenFeature, getFeatureFlagClient } from '../internal/openFeature';

export { getAppPluginMeta, getAppPluginMetas, setAppPluginMetas } from '../services/pluginMeta/apps';
export {
  useAppPluginMeta,
  useAppPluginMetas,
  useListedPanelPluginMetas,
  usePanelPluginMeta,
  usePanelPluginMetas,
  usePanelPluginMetasMap,
} from '../services/pluginMeta/hooks';
export type { AppPluginMetas, PanelPluginMetas } from '../services/pluginMeta/types';
export { getCachedPromise, invalidateCache, setLogger } from '../utils/getCachedPromise';
export { defineFeatureEvents } from './analyticsFramework/main';
export type { EventProperty, Event } from './analyticsFramework/types';
export {
  getListedPanelPluginMetas,
  getPanelPluginMeta,
  getPanelPluginMetas,
  getPanelPluginMetasMap,
  getPanelPluginMetasMapSync,
  setPanelPluginMetas,
  refetchPanelPluginMetas,
} from '../services/pluginMeta/panels';
export { installPluginMeta, uninstallPluginMeta } from '../services/pluginMeta/plugins';
export { logPluginMetaError, setPluginMetaLogger } from '../services/pluginMeta/logging';
