import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2020-2026 GoodData Corporation
import { memo } from "react";
import { Overlay } from "../Overlay/Overlay.js";
import { DialogBase } from "./DialogBase.js";
/**
 * @internal
 */
export const Dialog = memo(function Dialog({ containerClassName, onClick, onMouseUp, onMouseOver, onClose, shouldCloseOnClick, isModal = true, alignPoints, closeOnParentScroll, closeOnEscape, closeOnMouseDrag, refocusKey, ...dialogProps }) {
    return (_jsx(Overlay, { isModal: isModal, positionType: "fixed", alignPoints: alignPoints ?? [
            {
                align: "cc cc",
            },
        ], containerClassName: containerClassName, onMouseUp: onMouseUp, onMouseOver: onMouseOver, onClick: onClick, closeOnOutsideClick: Boolean(shouldCloseOnClick), shouldCloseOnClick: shouldCloseOnClick, closeOnEscape: closeOnEscape, closeOnParentScroll: closeOnParentScroll, closeOnMouseDrag: closeOnMouseDrag, onClose: onClose, children: _jsx(DialogBase, { ...dialogProps, isModal: isModal, onClose: onClose, refocusKey: refocusKey }) }));
});
