import { jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { stringUtils } from "@gooddata/util";
import { Button } from "../Button/index.js";
export function HeaderWorkspacePickerButton({ title, onClick, isOpen, dropdownId, buttonRef, }) {
    const classNames = cx({
        "gd-header-project": true,
        [`s-${stringUtils.simplifyText(title)}`]: true,
        "is-expanded": isOpen,
        "is-collapsed": !isOpen,
    });
    return (_jsx(Button, { ref: buttonRef, className: "gd-header-button gd-workspace-picker-button", onClick: onClick, title: title, accessibilityConfig: {
            isExpanded: isOpen,
            popupId: dropdownId,
        }, children: _jsx("div", { className: classNames, children: title }) }));
}
//# sourceMappingURL=HeaderWorkspacePickerButton.js.map