"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _i18n = require("@wordpress/i18n");
var _blockEditor = require("@wordpress/block-editor");
var _dimensionsPanel = _interopRequireDefault(require("./dimensions-panel"));
var _header = _interopRequireDefault(require("./header"));
var _lockUnlock = require("../../lock-unlock");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const {
  useHasDimensionsPanel,
  useGlobalSetting,
  useSettingsForBlockElement
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
function ScreenLayout() {
  const [rawSettings] = useGlobalSetting('');
  const settings = useSettingsForBlockElement(rawSettings);
  const hasDimensionsPanel = useHasDimensionsPanel(settings);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
      title: (0, _i18n.__)('Layout')
    }), hasDimensionsPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_dimensionsPanel.default, {})]
  });
}
var _default = exports.default = ScreenLayout;
//# sourceMappingURL=screen-layout.js.map