"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
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;
var jsx_runtime_1 = require("react/jsx-runtime");
var path_1 = require("path");
var antd_1 = require("antd");
var config_1 = require("lib/config");
var head_1 = __importDefault(require("next/head"));
var analytics_1 = __importDefault(require("components/analytics"));
var footer_1 = __importDefault(require("components/landing/footer"));
var header_1 = __importDefault(require("./header"));
var base_path_1 = __importDefault(require("lib/base-path"));
var use_customize_1 = __importDefault(require("lib/use-customize"));
var favicon = (0, path_1.join)(base_path_1.default, "webapp/favicon-32x32.png");
function Layout(_a) {
    var title = _a.title, children = _a.children, top = _a.top;
    var _b = (0, use_customize_1.default)(), siteName = _b.siteName, noindex = _b.noindex;
    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, __assign({ style: { background: "white" } }, { children: [top, (0, jsx_runtime_1.jsx)("div", __assign({ 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(_a) {
    var title = _a.title, children = _a.children;
    var siteName = (0, use_customize_1.default)().siteName;
    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