import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2023-2025 GoodData Corporation
import { Dialog, useId } from "@gooddata/sdk-ui-kit";
import { AttributeHierarchyDialogContent } from "./AttributeHierarchyDialogContent.js";
import { AttributeHierarchyDialogFooter } from "./AttributeHierarchyDialogFooter.js";
import { AttributeHierarchyDialogHeader } from "./AttributeHierarchyDialogHeader.js";
import { useAttributeHierarchyDialog } from "./AttributeHierarchyDialogProvider.js";
import { DeleteAttributeHierarchyConfirmation } from "./DeleteAttributeHieraryConfirmation.js";
export function AttributeHierarchyDialogCore() {
    const { onClose, shouldDisplayDeleteConfirmation, title } = useAttributeHierarchyDialog();
    const titleElementId = useId();
    return shouldDisplayDeleteConfirmation ? (_jsx(DeleteAttributeHierarchyConfirmation, {})) : (_jsxs(Dialog, { containerClassName: "attribute-hierarchy-overlay s-attribute-hierarchy-overlay", className: "attribute-hierarchy-dialog s-attribute-hierarchy-dialog", displayCloseButton: true, onClose: onClose, accessibilityConfig: { titleElementId }, children: [_jsx("h2", { className: "sr-only", id: titleElementId, children: title }), _jsx(AttributeHierarchyDialogHeader, {}), _jsx(AttributeHierarchyDialogContent, {}), _jsx(AttributeHierarchyDialogFooter, {})] }));
}
//# sourceMappingURL=AttributeHierarchyDialogCore.js.map