import React, { Component, } from 'react';
import { SoftIcon, SoftHeaderSectionItemButton, SoftKeyPadMenu, SoftKeyPadMenuItem, SoftPopover, } from '../../components';
export default class extends Component {
    constructor(props) {
        super(props);
        this.state = {
            isOpen: false,
        };
        this.onMenuButtonClick = () => {
            this.setState({
                isOpen: !this.state.isOpen,
            });
        };
        this.closeMenu = () => {
            this.setState({
                isOpen: false,
            });
        };
    }
    render() {
        const button = (React.createElement(SoftHeaderSectionItemButton, { "aria-controls": "keyPadMenu", "aria-expanded": this.state.isOpen, "aria-haspopup": "true", "aria-label": "Apps menu", onClick: this.onMenuButtonClick },
            React.createElement(SoftIcon, { type: "apps", size: "m" })));
        return (React.createElement(SoftPopover, { id: "headerAppMenu", ownFocus: true, button: button, isOpen: this.state.isOpen, anchorPosition: "downRight", closePopover: this.closeMenu },
            React.createElement(SoftKeyPadMenu, { id: "keyPadMenu", style: { width: 288 } },
                React.createElement(SoftKeyPadMenuItem, { label: "Discover", href: "#" },
                    React.createElement(SoftIcon, { type: "discoverApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Dashboard", href: "#" },
                    React.createElement(SoftIcon, { type: "dashboardApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Dev Tools", href: "#" },
                    React.createElement(SoftIcon, { type: "devToolsApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Machine Learning", href: "#" },
                    React.createElement(SoftIcon, { type: "machineLearningApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Graph", href: "#" },
                    React.createElement(SoftIcon, { type: "graphApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Visualize", href: "#" },
                    React.createElement(SoftIcon, { type: "visualizeApp", size: "l" })),
                React.createElement(SoftKeyPadMenuItem, { label: "Timelion", href: "#" },
                    React.createElement(SoftIcon, { type: "timelionApp", size: "l" })))));
    }
}
//# sourceMappingURL=header_app_menu.js.map