import { getAnalyticsAppearance } from './getAnalyticsAppearance';
import { SEVERITY } from './SEVERITY';
export var getAnalyticsEditorAppearance = function getAnalyticsEditorAppearance(editorAppearance) {
  return editorAppearance ? "editor_".concat(getAnalyticsAppearance(editorAppearance)) : '_unknown';
};
export var getAnalyticsEventSeverity = function getAnalyticsEventSeverity(duration, normalThreshold, degradedThreshold) {
  if (duration > normalThreshold && duration <= degradedThreshold) {
    return SEVERITY.DEGRADED;
  }
  if (duration > degradedThreshold) {
    return SEVERITY.BLOCKING;
  }
  return SEVERITY.NORMAL;
};
export var analyticsEventKey = 'EDITOR_ANALYTICS_EVENT';
var EDITOR_BREAKPOINT_WIDTH = {
  S: 760,
  M: 1600,
  L: Infinity
};
var TABLE_BREAKPOINT_KEYS = Object.keys(EDITOR_BREAKPOINT_WIDTH);
export var getBreakpointKey = function getBreakpointKey(width) {
  return TABLE_BREAKPOINT_KEYS.find(function (key) {
    return width <= EDITOR_BREAKPOINT_WIDTH[key];
  }) || 'L';
};
// eslint-disable-next-line @atlaskit/editor/no-re-export
export { getAnalyticsAppearance } from './getAnalyticsAppearance';
// eslint-disable-next-line @atlaskit/editor/no-re-export
export { findInsertLocation } from './findInsertLocation';
// eslint-disable-next-line @atlaskit/editor/no-re-export
export { SEVERITY } from './SEVERITY';