"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.templateItemRoute = void 0;
var _editor = _interopRequireDefault(require("../editor"));
var _sidebarNavigationScreenTemplatesBrowse = _interopRequireDefault(require("../sidebar-navigation-screen-templates-browse"));
var _sidebarNavigationScreenUnsupported = _interopRequireDefault(require("../sidebar-navigation-screen-unsupported"));
var _jsxRuntime = require("react/jsx-runtime");
/**
 * Internal dependencies
 */

const templateItemRoute = exports.templateItemRoute = {
  name: 'template-item',
  path: '/wp_template/*postId',
  areas: {
    sidebar({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenTemplatesBrowse.default, {
        backPath: "/"
      }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenUnsupported.default, {});
    },
    mobile({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenUnsupported.default, {});
    },
    preview({
      siteData
    }) {
      const isBlockTheme = siteData.currentTheme?.is_block_theme;
      return isBlockTheme ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenUnsupported.default, {});
    }
  }
};
//# sourceMappingURL=template-item.js.map