"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "SEVERITY", {
  enumerable: true,
  get: function get() {
    return _SEVERITY.SEVERITY;
  }
});
exports.analyticsEventKey = void 0;
Object.defineProperty(exports, "findInsertLocation", {
  enumerable: true,
  get: function get() {
    return _findInsertLocation.findInsertLocation;
  }
});
Object.defineProperty(exports, "getAnalyticsAppearance", {
  enumerable: true,
  get: function get() {
    return _getAnalyticsAppearance.getAnalyticsAppearance;
  }
});
exports.getBreakpointKey = exports.getAnalyticsEventSeverity = exports.getAnalyticsEditorAppearance = void 0;
var _getAnalyticsAppearance = require("./getAnalyticsAppearance");
var _SEVERITY = require("./SEVERITY");
var _findInsertLocation = require("./findInsertLocation");
var getAnalyticsEditorAppearance = exports.getAnalyticsEditorAppearance = function getAnalyticsEditorAppearance(editorAppearance) {
  return editorAppearance ? "editor_".concat((0, _getAnalyticsAppearance.getAnalyticsAppearance)(editorAppearance)) : '_unknown';
};

// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
var getAnalyticsEventSeverity = exports.getAnalyticsEventSeverity = function getAnalyticsEventSeverity(duration, normalThreshold, degradedThreshold) {
  if (duration > normalThreshold && duration <= degradedThreshold) {
    return _SEVERITY.SEVERITY.DEGRADED;
  }
  if (duration > degradedThreshold) {
    return _SEVERITY.SEVERITY.BLOCKING;
  }
  return _SEVERITY.SEVERITY.NORMAL;
};

// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
var analyticsEventKey = exports.analyticsEventKey = 'EDITOR_ANALYTICS_EVENT';
var EDITOR_BREAKPOINT_WIDTH = {
  S: 760,
  M: 1600,
  L: Infinity
};
var TABLE_BREAKPOINT_KEYS = Object.keys(EDITOR_BREAKPOINT_WIDTH);

// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
var getBreakpointKey = exports.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

// eslint-disable-next-line @atlaskit/editor/no-re-export

// eslint-disable-next-line @atlaskit/editor/no-re-export