"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
const antd_1 = require("antd");
const { Content } = antd_1.Layout;
const STYLE = {
    background: "white",
    minHeight: "75vh",
    maxWidth: "992px",
    width: "100%",
    margin: "0 auto",
    padding: "0 20px",
};
function Main(props) {
    const { nav, children } = props;
    const style = { ...STYLE, ...props.style };
    function renderNav() {
        if (nav == null)
            return null;
        return ((0, jsx_runtime_1.jsx)(antd_1.Breadcrumb, { style: { margin: "50px 0 25px 0" }, children: nav.map((entry, idx) => ((0, jsx_runtime_1.jsx)(antd_1.Breadcrumb.Item, { children: entry }, idx))) }));
    }
    return ((0, jsx_runtime_1.jsxs)(Content, { style: style, children: [renderNav(), children] }));
}
exports.default = Main;
//# sourceMappingURL=main.js.map