import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
export const calcTableWidth = (layout, containerWidth, addControllerPadding = 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';
  }
};