import React from "react";
import { useSelector, useDispatch } from "react-redux";
import { SPACE_PANEL_STATE } from "../../../../utils/utils";
import NetdataLogo from "./assets/netdata-logo.svg";
import { LogoSection, LogoContainer, StyledButton } from "./styled";
import { setSpacePanelStatusAction } from "../../../../domains/global/actions";
import { selectSpacePanelIsActive } from "../../../../domains/global/selectors";
export const PanelControl = () => {
    const dispatch = useDispatch();
    const spacePanelIsActive = useSelector(selectSpacePanelIsActive);
    return (React.createElement(LogoSection, null,
        React.createElement(LogoContainer, null,
            React.createElement("svg", { width: "100%", height: "100%", viewBox: NetdataLogo.viewBox },
                React.createElement("use", { xlinkHref: `#${NetdataLogo.id}` }))),
        React.createElement(StyledButton, { neutral: true, flavour: "borderless", icon: "hamburger", onClick: () => {
                localStorage.setItem(SPACE_PANEL_STATE, String(!spacePanelIsActive));
                dispatch(setSpacePanelStatusAction({ isActive: !spacePanelIsActive }));
            }, themeType: "dark" })));
};
//# sourceMappingURL=panel-control.js.map