1 import { useModalTwoStatic } from '@proton/components/components/modalTwo/useModalTwo';
3 import ContactMergeDetailsModal from '../merge/ContactMergeDetailsModal';
4 import type { ContactMergeProps } from '../merge/ContactMergeModal';
5 import ContactMergeModal from '../merge/ContactMergeModal';
6 import type { ContactMergePreviewModalProps } from '../merge/ContactMergePreviewModal';
7 import ContactMergePreviewModal from '../merge/ContactMergePreviewModal';
9 export const useContactMergeModals = () => {
10 const [contactMergeModal, handleShowContactMergeModal] = useModalTwoStatic(ContactMergeModal);
12 const [contactMergePreviewModal, handleShowContactMergePreviewModal] = useModalTwoStatic(ContactMergePreviewModal);
14 const [contactMergeDetailsModal, handleShowContactMergeDetailsModal] = useModalTwoStatic(ContactMergeDetailsModal);
16 const handleMergeDetails = (contactID: string) => {
17 handleShowContactMergeDetailsModal({ contactID });
20 const handleMergePreview = (props: ContactMergePreviewModalProps) => {
21 handleShowContactMergePreviewModal(props);
24 const handleMerge = (props: ContactMergeProps) => {
25 handleShowContactMergeModal({
27 onMergeDetails: handleMergeDetails,
28 onMergePreview: handleMergePreview,
35 {contactMergePreviewModal}
36 {contactMergeDetailsModal}