// @ts-nocheck
import React, { useRef } from "react";
import { MenuSidebar } from "../menu-sidebar";
import { useUpdateTheme } from "./use-update-theme";
import useCurrentChart from "./useCurrentChart";
import useMenu from "./useMenu";
import DashboardCharts from "./dashboardCharts";
import "../../../../dashboard_info";
import "./node-view.scss";
const emptyObject = {};
const noop = () => { };
export const NodeView = ({ chartsMetadata, dropdownMenu, host = "http://localhost:19999", renderCustomElementForDygraph, onAttributesChange, renderBeforeCharts, scrollableContainerRef, timeWindow, attributes = emptyObject, commonAttributesOverrides, metricsCorrelationMetadata, children, nodeIDs, reportEvent = noop, defaultChart = "", onChangeChart, hasKubernetes = false, }) => {
    const ref = useRef(null);
    const [currentChart] = useCurrentChart({ ref, scrollableContainerRef, onChangeChart, defaultChart });
    const [main, menus] = useMenu({ metricsCorrelationMetadata, chartsMetadata, hasKubernetes });
    useUpdateTheme();
    return (React.createElement("div", { className: "node-view__container" },
        React.createElement(DashboardCharts, { ref: ref, main: main, menus: menus, defaultChart: defaultChart, timeWindow: timeWindow, chartsMetadata: chartsMetadata, renderCustomElementForDygraph: renderCustomElementForDygraph, onAttributesChange: onAttributesChange, renderBeforeCharts: renderBeforeCharts, dropdownMenu: dropdownMenu, host: host, metricsCorrelationMetadata: metricsCorrelationMetadata, attributes: attributes, commonAttributesOverrides: commonAttributesOverrides, nodeIDs: nodeIDs }, children),
        React.createElement(MenuSidebar, { currentChart: currentChart, 
            // @ts-ignore
            menuNames: main, 
            // @ts-ignore
            menus: menus, reportEvent: reportEvent })));
};
//# sourceMappingURL=node-view.js.map