"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.shouldExtensionBreakout = void 0;
var breakoutLayouts = new Set(['full-width', 'wide']);
var shouldRespectBreakoutForAppearance = function shouldRespectBreakoutForAppearance(appearance) {
  if (!appearance) {
    return true;
  }
  if (appearance === 'full-width') {
    return false;
  }
  if (appearance === 'max') {
    return false;
  }
  return true;
};
var shouldExtensionBreakout = exports.shouldExtensionBreakout = function shouldExtensionBreakout(_ref) {
  var layout = _ref.layout,
    _ref$isTopLevelNode = _ref.isTopLevelNode,
    isTopLevelNode = _ref$isTopLevelNode === void 0 ? true : _ref$isTopLevelNode,
    editorAppearance = _ref.editorAppearance;
  if (!layout || !breakoutLayouts.has(layout)) {
    return false;
  }
  if (!isTopLevelNode) {
    return false;
  }
  return shouldRespectBreakoutForAppearance(editorAppearance);
};