- format long import statements with consistent line wrapping - apply consistent indentation across client and server modules - remove generated tsconfig.tsbuildinfo file
46 lines
1019 B
TypeScript
46 lines
1019 B
TypeScript
import { useTranslation } from 'react-i18next';
|
|
import { X, Trash2 } from 'lucide-react';
|
|
import { Modal, Button } from '../../ui';
|
|
|
|
export interface DeleteConfirmationModalProps {
|
|
open: boolean;
|
|
title: string;
|
|
message: string;
|
|
onClose: () => void;
|
|
onConfirm: () => void;
|
|
isDeleting: boolean;
|
|
}
|
|
|
|
export function DeleteConfirmationModal({
|
|
open,
|
|
title,
|
|
message,
|
|
onClose,
|
|
onConfirm,
|
|
isDeleting,
|
|
}: DeleteConfirmationModalProps) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Modal
|
|
open={open}
|
|
title={title}
|
|
onClose={() => !isDeleting && onClose()}
|
|
footer={
|
|
<>
|
|
<Button variant="secondary" onClick={onClose} disabled={isDeleting}>
|
|
<X size={14} />
|
|
{t('common.button_cancel')}
|
|
</Button>
|
|
<Button variant="danger" onClick={onConfirm} disabled={isDeleting}>
|
|
<Trash2 size={14} />
|
|
{t('common.button_delete')}
|
|
</Button>
|
|
</>
|
|
}
|
|
>
|
|
{message}
|
|
</Modal>
|
|
);
|
|
}
|