import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2023-2025 GoodData Corporation
import { FormattedMessage, useIntl } from "react-intl";
import { messages } from "@gooddata/sdk-ui";
import { ConfirmDialog, LoadingMask } from "@gooddata/sdk-ui-kit";
import { useAttributeHierarchyDialog } from "./AttributeHierarchyDialogProvider.js";
export function DeleteAttributeHierarchyConfirmation() {
    const { formatMessage } = useIntl();
    const { isLoading, setLoading, setDisplayDeleteConfirmation, onDeleteAttributeHierarchy } = useAttributeHierarchyDialog();
    const handleClose = () => {
        setLoading(false);
        setDisplayDeleteConfirmation(false);
    };
    const cancelText = formatMessage(messages["hierarchyCancelButton"]);
    const deleteText = formatMessage(messages["hierarchyDeleteButton"]);
    const headlineText = formatMessage(messages["hierarchyDeleteConfirmTitle"]);
    return (_jsxs(ConfirmDialog, { className: "attribute-hierarchy-delete-confirmation s-attribute-hierarchy-delete-confirmation", cancelButtonText: cancelText, submitButtonText: deleteText, isCancelDisabled: isLoading, isSubmitDisabled: isLoading, headline: headlineText, displayCloseButton: true, onCancel: handleClose, onSubmit: onDeleteAttributeHierarchy, children: [_jsx(FormattedMessage, { id: messages["hierarchyDeleteConfirmMessage"].id, tagName: "div" }), isLoading ? (_jsx(LoadingMask, { className: "attribute-hierarchy-content-loading-mask s-attribute-hierarchy-content-loading-mask" })) : null] }));
}
//# sourceMappingURL=DeleteAttributeHieraryConfirmation.js.map