import { jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { useIntl } from "react-intl";
/**
 * @internal
 */
export function AddAttributeFilterButton({ id, className, isOpen, title, buttonRef, onClick, }) {
    const intl = useIntl();
    title = title ?? intl.formatMessage({ id: "addPanel.attributeFilter" });
    const rootClassNames = cx(className, "is-loaded", {
        "is-active": isOpen,
    });
    return (_jsx("div", { id: id, ref: buttonRef, className: rootClassNames, onClick: onClick, children: _jsx("div", { className: "button-content", children: _jsx("div", { className: "button-title", children: title }) }) }));
}
