"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DashboardToolbar = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
const join_1 = tslib_1.__importDefault(require("../utils/join"));
const rebass_1 = require("rebass");
function DashboardToolbar(props) {
    return (React.createElement("div", { className: (0, join_1.default)('ab-Dashboard__toolbar', props.className) },
        React.createElement("div", { className: "ab-Dashboard__toolbar-content" }, props.children),
        React.createElement(rebass_1.Flex, { className: "ab-Dashboard__toolbar-title", flexDirection: "row", alignItems: "center" },
            React.createElement("span", null, props.title),
            props.showConfigure && (React.createElement(SimpleButton_1.default, { icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
            ' ',
            props.showClose && (React.createElement(SimpleButton_1.default, { style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
}
exports.DashboardToolbar = DashboardToolbar;
