"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const hslayout = __importStar(require("hslayout"));
const header = __importStar(require("./view/DocsMenu"));
const left = __importStar(require("./view/LeftNav"));
const main = __importStar(require("./view/MainDetail"));
const design = {
    root: { Layout: {
            columns: ["200px", "fill"],
            css: ".hsdocs",
            content: ["LeftPane", "Main"]
        } },
    LeftPane: { Layout: {
            css: ".hsdocs_leftpane",
            rows: ["30px", "fill", "14px"],
            content: ["title", "leftnav", "footer"]
        } },
    Main: { Layout: {
            css: ".hsdocs_left",
            rows: ["30px", "fill"],
            content: ["menu", "mainDetail"]
        } },
    title: { "Layout": {
            css: ".hsdocs_title",
            content: "hsDocs",
            href: "https://github.com/HelpfulScripts/hsDocs"
        } },
    leftnav: { "LeftNav": {
            css: ".hsdocs_leftnav",
        } },
    footer: { "Layout": {
            css: ".hsdocs_footer",
            content: "powered by <i><a href='https://github.com/HelpfulScripts/hsDocs' target='_blank'>hsDocs</a></i>"
        } },
    menu: { "DocsMenu": {
            css: '.hsdocs_menu',
            docSet: "./data/index.json"
        } },
    mainDetail: { "MainDetail": {
            css: '.hsdocs_detail',
        } }
};
function init() {
    const Router = {
        view: () => hslayout.m(hslayout.Config, Object.assign({ source: design, context: [hslayout, header, left, main] }, {
            route: { field: hslayout.m.route.param('field'),
                lib: hslayout.m.route.param('lib') }
        }))
    };
    hslayout.m.route(document.body, '/api', {
        '/api': Router,
        '/api/:lib': Router,
        '/api/:lib/:field': Router
    });
}
exports.init = init;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2l0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9TaXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ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