"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getServerSideProps = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const footer_1 = __importDefault(require("components/landing/footer"));
const header_1 = __importDefault(require("components/landing/header"));
const head_1 = __importDefault(require("components/landing/head"));
const with_customize_1 = __importDefault(require("lib/with-customize"));
const customize_1 = require("lib/customize");
const antd_1 = require("antd");
const stats_1 = __importDefault(require("lib/landing/stats"));
const icon_1 = require("@cocalc/frontend/components/icon");
const statistics_1 = __importDefault(require("components/statistics"));
const config_1 = require("lib/config");
function Stats({ customize, stats }) {
    const { siteName } = customize;
    return ((0, jsx_runtime_1.jsxs)(customize_1.Customize, { value: customize, children: [(0, jsx_runtime_1.jsx)(head_1.default, { title: "System Activity Status" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout, { children: [(0, jsx_runtime_1.jsx)(header_1.default, { page: "info", subPage: "status" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, { style: {
                            backgroundColor: "white",
                        }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
                                    maxWidth: config_1.MAX_WIDTH,
                                    margin: "15px auto",
                                    padding: "15px",
                                    backgroundColor: "white",
                                }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { textAlign: "center", color: "#444" }, children: [(0, jsx_runtime_1.jsxs)("h1", { style: { fontSize: "28pt" }, children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "dashboard", style: { marginRight: "30px" } }), siteName, " - System Activity Status"] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Track how heavily ", siteName, " is being used."] })] }), stats != null ? (0, jsx_runtime_1.jsx)(statistics_1.default, { stats: stats }) : "(not available)"] }), (0, jsx_runtime_1.jsx)(footer_1.default, {})] })] })] }));
}
exports.default = Stats;
async function getServerSideProps(context) {
    const stats = await (0, stats_1.default)();
    return await (0, with_customize_1.default)({ context, props: { stats } });
}
exports.getServerSideProps = getServerSideProps;
//# sourceMappingURL=status.js.map