import { jsx as _jsx } from "react/jsx-runtime";
import cx from "classnames";
import { Overlay } from "../Overlay/Overlay.js";
const dropdownAlignPoints = [{ align: "bl tl" }, { align: "br tr" }];
/**
 * @internal
 */
export function ChartSortingDropdownBody({ children, buttonNode, onClose }) {
    const getDialogClasses = () => {
        return cx([
            "overlay",
            "gd-dialog",
            "gd-dropdown",
            "gd-sort-charting-dropdown",
            "gd-sort-charting-dropdown-wide",
            "s-sort-charting-dropdown",
        ]);
    };
    return (_jsx(Overlay, { alignTo: buttonNode, alignPoints: dropdownAlignPoints, closeOnOutsideClick: true, closeOnParentScroll: true, closeOnMouseDrag: true, ignoreClicksOnByClass: [
            ".gd-measure-sorting-dropdown-body",
            ".gd-attribute-sorting-dropdown-body",
        ], onClose: onClose, children: _jsx("div", { className: getDialogClasses(), children: children }) }));
}
