"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useEditorTabs = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const React = tslib_1.__importStar(require("react"));
const Tabs_1 = tslib_1.__importDefault(require("../components/Tabs/Tabs.js"));
const BlockConfigForm_1 = tslib_1.__importDefault(require("../containers/BlockConfigForm/BlockConfigForm.js"));
const BlocksList_1 = tslib_1.__importDefault(require("../containers/BlocksList/BlocksList.js"));
const GlobalConfig_1 = tslib_1.__importDefault(require("../containers/GlobalConfig/GlobalConfig.js"));
const SourceCode_1 = tslib_1.__importDefault(require("../containers/SourceCode/SourceCode.js"));
const Tree_1 = tslib_1.__importDefault(require("../containers/Tree/index.js"));
const useEditorTabs = ({ leftTabs, rightTabs, }) => {
    const tabs = React.useMemo(() => ({
        left: [
            {
                id: 'page',
                title: 'PAGE',
                component: () => ((0, jsx_runtime_1.jsx)(Tabs_1.default, { items: [
                        {
                            id: 'blocks-list',
                            title: 'BLOCKS',
                            component: BlocksList_1.default,
                            withPadding: true,
                        },
                        {
                            id: 'layers',
                            title: 'LAYERS',
                            component: Tree_1.default,
                            withPadding: true,
                        },
                        {
                            id: 'source-code',
                            title: 'RAW',
                            component: ({ className }) => ((0, jsx_runtime_1.jsx)(SourceCode_1.default, { className: className })),
                            withPadding: true,
                        },
                    ] })),
            },
            {
                id: 'global',
                title: 'GLOBAL',
                component: GlobalConfig_1.default,
            },
            ...(leftTabs || []),
        ],
        right: [
            {
                id: 'edit',
                title: 'EDIT',
                component: () => ((0, jsx_runtime_1.jsx)(Tabs_1.default, { items: [
                        {
                            id: 'block-config',
                            title: 'INPUTS',
                            component: BlockConfigForm_1.default,
                        },
                        {
                            id: 'source-code',
                            title: 'RAW',
                            component: ({ className }) => ((0, jsx_runtime_1.jsx)(SourceCode_1.default, { className: className, showSelectedBlockOnly: true })),
                            withPadding: true,
                        },
                    ] })),
            },
            ...(rightTabs || []),
        ],
    }), [leftTabs, rightTabs]);
    return tabs;
};
exports.useEditorTabs = useEditorTabs;
//# sourceMappingURL=useEditorTabs.js.map
