"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");
/*
 *  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 footer_1 = __importDefault(require("components/landing/footer"));
const head_1 = __importDefault(require("components/landing/head"));
const header_1 = __importDefault(require("components/landing/header"));
const image_1 = __importDefault(require("components/landing/image"));
const software_info_1 = __importDefault(require("components/landing/software-info"));
const software_libraries_1 = __importDefault(require("components/landing/software-libraries"));
const A_1 = __importDefault(require("components/misc/A"));
const customize_1 = require("lib/customize");
const software_specs_1 = require("lib/landing/software-specs");
const _1 = require(".");
const cocalc_octave_jupyter_20200511_png_1 = __importDefault(require("/public/features/cocalc-octave-jupyter-20200511.png"));
function Octave(props) {
    const { customize, spec, inventory, components, execInfo } = props;
    function renderBox() {
        return ((0, jsx_runtime_1.jsx)(antd_1.Alert, { style: { margin: "15px 0" }, message: "Learn More", description: (0, jsx_runtime_1.jsxs)("span", { style: { fontSize: "10pt" }, children: ["Learn more about", " ", (0, jsx_runtime_1.jsx)("strong", { children: (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/octave", children: "GNU Octave related functionality in CoCalc" }) }), "."] }), type: "info", showIcon: true }));
    }
    function renderInfo() {
        return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: { width: "50%", float: "right", padding: "0 0 15px 15px" }, children: (0, jsx_runtime_1.jsx)(image_1.default, { src: cocalc_octave_jupyter_20200511_png_1.default, alt: "Using Octave in a Jupyter notebook" }) }), (0, jsx_runtime_1.jsxs)("p", { children: ["This table lists", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.gnu.org/software/octave/", children: "GNU Octave" }), " packages that are immediately available to use in any CoCalc project, along with their respective version numbers."] }), (0, jsx_runtime_1.jsx)("p", { children: "If something is missing, you can request that we install it." })] }));
    }
    return ((0, jsx_runtime_1.jsxs)(customize_1.Customize, { value: customize, children: [(0, jsx_runtime_1.jsx)(head_1.default, { title: "Octave Packages in CoCalc" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout, { children: [(0, jsx_runtime_1.jsx)(header_1.default, { page: "software", subPage: "octave" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, { style: {
                            backgroundColor: "white",
                        }, children: [(0, jsx_runtime_1.jsxs)("div", { style: _1.STYLE_PAGE, children: [(0, jsx_runtime_1.jsx)("h1", { style: { textAlign: "center", fontSize: "32pt", color: "#444" }, children: "GNU Octave Scientific Programming Packages" }), renderInfo(), renderBox(), (0, jsx_runtime_1.jsx)(software_info_1.default, { info: execInfo }), (0, jsx_runtime_1.jsx)(software_libraries_1.default, { spec: spec, inventory: inventory, components: components, libWidthPct: 60 })] }), (0, jsx_runtime_1.jsx)(footer_1.default, {})] })] })] }));
}
exports.default = Octave;
async function getServerSideProps(context) {
    return await (0, software_specs_1.withCustomizedAndSoftwareSpec)(context, "octave", [
        "/usr/local/bin/octave",
    ]);
}
exports.getServerSideProps = getServerSideProps;
//# sourceMappingURL=octave.js.map