import ConsoleIcon from 'mdi-react/ConsoleIcon';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { SIDEBAR_BUTTON_CLASS, SidebarGroup, SidebarGroupHeader, SidebarGroupItems, SidebarNavItem, } from '../components/Sidebar';
/**
 * Sidebar for the site admin area.
 */
export const SiteAdminSidebar = ({ className, groups }) => (React.createElement("div", { className: `site-admin-sidebar ${className}` },
    groups.map(({ header, items, condition = () => true }, i) => condition({}) && (React.createElement(SidebarGroup, { key: i },
        header && React.createElement(SidebarGroupHeader, { icon: header.icon, label: header.label }),
        React.createElement(SidebarGroupItems, null, items.map(({ label, to, exact, condition = () => true }) => condition({}) && (React.createElement(SidebarNavItem, { to: to, exact: exact, key: label }, label))))))),
    React.createElement(Link, { to: "/api/console", className: SIDEBAR_BUTTON_CLASS },
        React.createElement(ConsoleIcon, { className: "icon-inline" }),
        "API console"),
    React.createElement("a", { href: "/-/debug/", className: SIDEBAR_BUTTON_CLASS }, "Instrumentation")));
//# sourceMappingURL=SiteAdminSidebar.js.map