"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.App = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importStar(require("react"));
var notifications_1 = require("./components/Notifications/notifications");
var auth_1 = require("./components/Auth/auth");
var build_1 = require("./components/Build/build");
var body_1 = require("./components/Body/body");
var app_route_1 = require("./routes/AppRoute/app.route");
var admin_route_1 = require("./routes/AdminRoute/admin.route");
var settings_route_1 = require("./routes/SettingsRoute/settings.route");
var types_1 = require("./types/types");
var admin_table_1 = require("./routes/AdminRoute/admin.table");
var settings_table_1 = require("./routes/SettingsRoute/settings.table");
var v_eris_1 = require("v-eris");
require("./app.scss");
var en_1 = tslib_1.__importDefault(require("./lang/en"));
var en_test_1 = tslib_1.__importDefault(require("./lang/en.test"));
var ru_1 = tslib_1.__importDefault(require("./lang/ru"));
var Languages = {
    "ru": ru_1.default,
    "en": en_1.default,
};
var App = function () {
    var adminSections = (0, react_1.useMemo)(function () {
        var table = build_1.BuildCommands.joinTable(admin_table_1.AdminTable, {
            Filesystem2: [{
                    key: "Main", title: "Filesystem2", icon: react_1.default.createElement(v_eris_1.Icons.fileempty, null),
                    list: [
                        { key: "save", type: "button", mini: 1, params: { title: "save" } },
                    ],
                }],
        });
        var list = build_1.BuildCommands.joinList(admin_table_1.AdminList, [
            { key: "Applications", list: [
                    { title: "Admin::Module::Filesystem2", key: "Filesystem2", route: "filesystem", icon: react_1.default.createElement(v_eris_1.Icons.enter, null) },
                ] },
        ]);
        return { table: table, list: list };
    }, []);
    var settingsSections = (0, react_1.useMemo)(function () {
        var table = build_1.BuildCommands.joinTable(settings_table_1.SettingsTable, {
            Lang2: [{
                    title: "Settings::Module::Language", key: "Lang2",
                    list: [
                        { key: "CurrentLanguage", title: "General::Language::CurrentLanguage", desc: "General::Language::CurrentLanguage::Desc", type: "select",
                            value: "en",
                            button: "General::Language::CurrentLanguage::Button",
                            params: [
                                { title: "General::Language::CurrentLanguage::ru", value: "ru" },
                                { title: "General::Language::CurrentLanguage::en", value: "en" },
                                { title: "General::Language::CurrentLanguage::kz", value: "kz" }
                            ]
                        },
                    ]
                },],
        });
        var list = build_1.BuildCommands.joinList(settings_table_1.SettingsList, [
            { title: "Settings::Module::Appearance", key: "Appearance", icon: react_1.default.createElement(v_eris_1.Icons.image, null), list: [
                    { title: "Settings::Module::Lang2", key: "Lang2", icon: react_1.default.createElement(v_eris_1.Icons.command, null) },
                ] }
        ]);
        return { table: table, list: list };
    }, []);
    return react_1.default.createElement("div", null,
        react_1.default.createElement(build_1.Build, { languages: {
                "ru": build_1.BuildCommands.joinLang(Languages.ru, {}),
                "en": build_1.BuildCommands.joinLang(Languages.en, en_test_1.default),
            }, modules: [
                notifications_1.NotificationsModuleInit,
                auth_1.AuthModuleInit
            ], types: build_1.BuildCommands.joinTypes(types_1.Types, {}), settingsTable: settingsSections.table, routes: {
                "app": { icon: react_1.default.createElement(v_eris_1.Icons.earth, null), access: 3, title: "App", element: (react_1.default.createElement(app_route_1.AppRoute, null)) },
                "admin": { icon: react_1.default.createElement(v_eris_1.Icons.users, null), access: 9, title: "Admin", element: react_1.default.createElement(admin_route_1.AdminRoute, null), list: adminSections.list, table: adminSections.table },
                "settings": { icon: react_1.default.createElement(v_eris_1.Icons.cog, null), access: 5, title: "Settings", element: react_1.default.createElement(settings_route_1.SettingsRoute, null), list: settingsSections.list, table: settingsSections.table },
            } },
            react_1.default.createElement(notifications_1.Notifications, { container: true }),
            react_1.default.createElement(auth_1.Auth, null),
            react_1.default.createElement(body_1.BodyContainer, null)));
};
exports.App = App;
//# sourceMappingURL=app.js.map