"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Embed = exports.Layout = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const path_1 = require("path");
const antd_1 = require("antd");
const config_1 = require("lib/config");
const head_1 = __importDefault(require("next/head"));
const analytics_1 = __importDefault(require("components/analytics"));
const footer_1 = __importDefault(require("components/landing/footer"));
const header_1 = __importDefault(require("./header"));
const base_path_1 = __importDefault(require("lib/base-path"));
const use_customize_1 = __importDefault(require("lib/use-customize"));
const favicon = (0, path_1.join)(base_path_1.default, "webapp/favicon-32x32.png");
function Layout({ title, children, top }) {
    const { siteName, noindex } = (0, use_customize_1.default)();
    return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsxs)("title", { children: [siteName, " -- ", title] }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "CoCalc Share Server" }), noindex && (0, jsx_runtime_1.jsx)("meta", { name: "robots", content: "noindex,nofollow" }), (0, jsx_runtime_1.jsx)("link", { rel: "icon", href: favicon })] }), (0, jsx_runtime_1.jsxs)(antd_1.Layout, { children: [(0, jsx_runtime_1.jsx)(header_1.default, {}), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, { style: { background: "white" }, children: [top, (0, jsx_runtime_1.jsx)("div", { style: {
                                    color: "#555",
                                    margin: "0 auto",
                                    maxWidth: config_1.SHARE_MAX_WIDTH,
                                    fontSize: "11pt",
                                    padding: "15px",
                                }, children: children })] }), (0, jsx_runtime_1.jsx)(footer_1.default, {})] })] }));
}
exports.Layout = Layout;
function Embed({ title, children }) {
    const { siteName } = (0, use_customize_1.default)();
    return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsxs)("title", { children: [siteName, " -- ", title] }), (0, jsx_runtime_1.jsx)("link", { rel: "icon", href: favicon })] }), (0, jsx_runtime_1.jsx)(analytics_1.default, {}), (0, jsx_runtime_1.jsx)("main", { children: children })] }));
}
exports.Embed = Embed;
//# sourceMappingURL=layout.js.map