"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getContainerWidthOrFullEditorWidth = void 0;
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
/**
 * Calculates container or full editor width taking in account editor full width layout
 * width and editor gutter padding.
 */
var getContainerWidthOrFullEditorWidth = exports.getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
  var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
    exposure: true
  }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
  return Math.min(containerWidth - padding * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth) / 2;
};