"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.frame = frame;
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _reactBootstrap = require("react-bootstrap");

var _desktopNav = _interopRequireDefault(require("./desktop-nav"));

var _notFound = _interopRequireDefault(require("./not-found"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * This component defines the general application frame, to which
 * content and an optional sub-navigation component can be inserted.
 */
const AppFrame = ({
  children,
  SubNav
}) => /*#__PURE__*/_react.default.createElement("div", {
  className: "otp",
  id: "otp",
  role: "main"
}, /*#__PURE__*/_react.default.createElement(_desktopNav.default, null), SubNav && /*#__PURE__*/_react.default.createElement(SubNav, null), /*#__PURE__*/_react.default.createElement("div", {
  className: "container"
}, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Row, {
  xs: 12
}, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Col, {
  md: 8,
  mdOffset: 2,
  sm: 10,
  smOffset: 1,
  xs: 12
}, children))));
/**
 * Creates a simple wrapper component consisting of an AppFrame that surrounds
 * the provided component. (Displays "Content not found" if none provided.)
 */


function frame(Component) {
  return () => /*#__PURE__*/_react.default.createElement(AppFrame, null, Component ? /*#__PURE__*/_react.default.createElement(Component, null) : /*#__PURE__*/_react.default.createElement(_notFound.default, null));
}

var _default = AppFrame;
exports.default = _default;

//# sourceMappingURL=app-frame.js