import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import cx from "classnames";
import { useIntl } from "react-intl";
import { Button, DialogBase, Typography, useId } from "@gooddata/sdk-ui-kit";
import { DeleteLink } from "./DeleteLink.js";
import { messages } from "./locales.js";
export function ViewDialog({ dialogTitle, isAdmin, onEdit, editButtonIconClassName, editButtonText, children, deleteLinkText, isDeleteLinkEnabled, deleteLinkDisabledTooltipTextId, onOpenDeleteDialog, onClose, }) {
    const intl = useIntl();
    const titleElementId = useId();
    return (_jsxs(DialogBase, { className: "gd-share-dialog gd-share-dialog-add-users gd-user-management-dialog-view s-user-management-view-mode", displayCloseButton: true, onClose: onClose, accessibilityConfig: { titleElementId }, children: [_jsx("div", { className: "gd-dialog-header-wrapper", children: _jsx("div", { className: "gd-dialog-header", children: _jsxs(Typography, { tagName: "h3", className: "gd-dialog-header-title", children: [_jsx("span", { className: "s-user-management-title", id: titleElementId, children: dialogTitle }), isAdmin ? (_jsx("span", { className: "gd-setting-widget-status-pill", children: intl.formatMessage(messages.adminPill) })) : null] }) }) }), _jsx("div", { className: "gd-dialog-content", children: children }), _jsx("div", { className: "gd-dialog-footer", children: _jsxs("div", { className: "gd-user-management-dialog-buttons", children: [_jsx("div", { className: "gd-user-management-dialog-buttons-left", children: _jsx(Button, { className: "gd-button gd-button-secondary s-user-management-edit-button", iconLeft: cx(editButtonIconClassName, "gd-user-management-dialog-edit-mode-icon"), value: editButtonText, onClick: onEdit }) }), _jsxs("div", { className: "gd-user-management-dialog-buttons-right", children: [_jsx(DeleteLink, { deleteLinkText: deleteLinkText, onOpenDeleteDialog: onOpenDeleteDialog, isDeleteLinkEnabled: isDeleteLinkEnabled, disabledLinkTooltipTextId: deleteLinkDisabledTooltipTextId }), _jsx(Button, { className: "gd-button gd-button-secondary s-user-management-close-button", value: intl.formatMessage(messages.closeDialog), onClick: onClose })] })] }) })] }));
}
//# sourceMappingURL=ViewDialog.js.map