import { helper } from '@ember/component/helper';

function restrictWidth(restrictWidth, style) {
  let widthClassName;
  let newStyle = {
    ...(style || {})
  };
  if (restrictWidth === true) {
    widthClassName = 'restrictWidth-default';
  } else if (restrictWidth !== false) {
    widthClassName = 'restrictWidth-custom';
    newStyle = {
      ...newStyle,
      maxWidth: restrictWidth
    };
  }
  return {
    widthClassName,
    newStyle
  };
}
var euiPageRestrictWidth = helper(function ([restrict, style]) {
  return restrictWidth(restrict, style);
});

export { euiPageRestrictWidth as default, restrictWidth };
//# sourceMappingURL=eui-page-restrict-width.js.map
