"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.patternsRoute = void 0;
var _sidebarNavigationScreenPatterns = _interopRequireDefault(require("../sidebar-navigation-screen-patterns"));
var _pagePatterns = _interopRequireDefault(require("../page-patterns"));
var _utils = require("./utils");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * Internal dependencies
 */

const patternsRoute = exports.patternsRoute = {
  name: 'patterns',
  path: '/pattern',
  areas: {
    sidebar({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      const backPath = isBlockTheme || (0, _utils.isClassicThemeWithStyleBookSupport)(siteData) ? '/' : undefined;
      return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenPatterns.default, {
        backPath: backPath
      });
    },
    content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagePatterns.default, {}),
    mobile({
      siteData,
      query
    }) {
      const {
        categoryId
      } = query;
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      const backPath = isBlockTheme || (0, _utils.isClassicThemeWithStyleBookSupport)(siteData) ? '/' : undefined;
      return !!categoryId ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagePatterns.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenPatterns.default, {
        backPath: backPath
      });
    }
  }
};
//# sourceMappingURL=patterns.js.map