"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 _components = require("@wordpress/components");
var _backgroundPanel = _interopRequireDefault(require("./background-panel"));
var _header = _interopRequireDefault(require("./header"));
var _lockUnlock = require("../../lock-unlock");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const {
  useHasBackgroundPanel,
  useGlobalSetting
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
function ScreenBackground() {
  const [settings] = useGlobalSetting('');
  const hasBackgroundPanel = useHasBackgroundPanel(settings);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
      title: (0, _i18n.__)('Background'),
      description: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalText, {
        children: (0, _i18n.__)('Set styles for the site’s background.')
      })
    }), hasBackgroundPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_backgroundPanel.default, {})]
  });
}
var _default = exports.default = ScreenBackground;
//# sourceMappingURL=screen-background.js.map