/**
 * Internal dependencies
 */
import Editor from '../editor';
import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
import PageTemplates from '../page-templates';
import { jsx as _jsx } from "react/jsx-runtime";
export const templatesRoute = {
  name: 'templates',
  path: '/template',
  areas: {
    sidebar({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/_jsx(SidebarNavigationScreenTemplatesBrowse, {
        backPath: "/"
      }) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
    },
    content({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/_jsx(PageTemplates, {}) : undefined;
    },
    preview({
      query,
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      if (!isBlockTheme) {
        return undefined;
      }
      const isListView = query.layout === 'list';
      return isListView ? /*#__PURE__*/_jsx(Editor, {}) : undefined;
    },
    mobile({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/_jsx(PageTemplates, {}) : /*#__PURE__*/_jsx(SidebarNavigationScreenUnsupported, {});
    }
  },
  widths: {
    content({
      query
    }) {
      const isListView = query.layout === 'list';
      return isListView ? 380 : undefined;
    }
  }
};
//# sourceMappingURL=templates.js.map