import React from "react"; import { Button, Modal, ModalBody, ModalContent, ModalHeader, ModalFooter, Text, } from "design-system"; import { DELETE_CONFIRMATION_MODAL_TITLE, DELETE_CONFIRMATION_MODAL_SUBTITLE, } from "@appsmith/constants/messages"; type DeleteConfirmationProps = { userToBeDeleted: { name: string; username: string; workspaceId: string; userGroupId?: string; entityId?: string; entityType?: string; }; isOpen: boolean; onClose: () => void; onConfirm: () => void; isDeletingUser: boolean; }; function DeleteConfirmationModal(props: DeleteConfirmationProps) { const { isDeletingUser, isOpen, onClose, onConfirm, userToBeDeleted } = props; const { entityType, name, username } = userToBeDeleted; const onOpenChange = (isOpen: boolean) => { if (!isOpen) { onClose(); } }; return ( {DELETE_CONFIRMATION_MODAL_TITLE()} {DELETE_CONFIRMATION_MODAL_SUBTITLE(name || username, entityType)} ); } export default DeleteConfirmationModal;