import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
export var calcTableWidth = function calcTableWidth(layout, containerWidth) {
  var addControllerPadding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  switch (layout) {
    case 'full-width':
      return containerWidth ? Math.min(containerWidth - (addControllerPadding ? akEditorBreakoutPadding : 0), akEditorFullWidthLayoutWidth) : akEditorFullWidthLayoutWidth;
    case 'wide':
      if (containerWidth) {
        return Math.min(containerWidth - (addControllerPadding ? akEditorBreakoutPadding : 0), akEditorWideLayoutWidth);
      }
      return akEditorWideLayoutWidth;
    default:
      return 'inherit';
  }
};