/**
 * Internal dependencies
 */
import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
import PagePatterns from '../page-patterns';
import { isClassicThemeWithStyleBookSupport } from './utils';
import { jsx as _jsx } from "react/jsx-runtime";
export const patternsRoute = {
  name: 'patterns',
  path: '/pattern',
  areas: {
    sidebar({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? '/' : undefined;
      return /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
        backPath: backPath
      });
    },
    content: /*#__PURE__*/_jsx(PagePatterns, {}),
    mobile({
      siteData,
      query
    }) {
      const {
        categoryId
      } = query;
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      const backPath = isBlockTheme || isClassicThemeWithStyleBookSupport(siteData) ? '/' : undefined;
      return !!categoryId ? /*#__PURE__*/_jsx(PagePatterns, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
        backPath: backPath
      });
    }
  }
};
//# sourceMappingURL=patterns.js.map