"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = SidebarNavigationScreenMain;
var _components = require("@wordpress/components");
var _i18n = require("@wordpress/i18n");
var _icons = require("@wordpress/icons");
var _data = require("@wordpress/data");
var _element = require("@wordpress/element");
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
var _sidebarNavigationScreenGlobalStyles = require("../sidebar-navigation-screen-global-styles");
var _lockUnlock = require("../../lock-unlock");
var _store = require("../../store");
var _constants = require("../../utils/constants");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

function SidebarNavigationScreenMain() {
  const {
    setEditorCanvasContainerView
  } = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));

  // Clear the editor canvas container view when accessing the main navigation screen.
  (0, _element.useEffect)(() => {
    setEditorCanvasContainerView(undefined);
  }, [setEditorCanvasContainerView]);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
    isRoot: true,
    title: (0, _i18n.__)('Design'),
    description: (0, _i18n.__)('Customize the appearance of your website using the block editor.'),
    content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
      children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalItemGroup, {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
          uid: "navigation-navigation-item",
          params: {
            postType: _constants.NAVIGATION_POST_TYPE
          },
          withChevron: true,
          icon: _icons.navigation,
          children: (0, _i18n.__)('Navigation')
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenGlobalStyles.SidebarNavigationItemGlobalStyles, {
          uid: "styles-navigation-item",
          withChevron: true,
          icon: _icons.styles,
          children: (0, _i18n.__)('Styles')
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
          uid: "page-navigation-item",
          params: {
            postType: 'page'
          },
          withChevron: true,
          icon: _icons.page,
          children: (0, _i18n.__)('Pages')
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
          uid: "template-navigation-item",
          params: {
            postType: _constants.TEMPLATE_POST_TYPE
          },
          withChevron: true,
          icon: _icons.layout,
          children: (0, _i18n.__)('Templates')
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationItem.default, {
          uid: "patterns-navigation-item",
          params: {
            postType: _constants.PATTERN_TYPES.user
          },
          withChevron: true,
          icon: _icons.symbol,
          children: (0, _i18n.__)('Patterns')
        })]
      })
    })
  });
}
//# sourceMappingURL=index.js.map