function showMergeModal(duplicates) {
        contactMergerModal.activate({
            params: {
                title: I18N.mergeContacts,
                duplicates,
                onClickMerge(groups = {}) {
                    doMerge(groups).catch(() => {});
                    contactMergerModal.deactivate();
                },
                onClickDetails(selection) {
                    showContactDisplayModal(selection.vCard);
                },
                onClickPreview(group = [], groupName = '', mergeGroupSuccess) {
                    const selectedContacts = group.filter(({ selected }) => selected);
                    if (selectedContacts.length <= 1) {
                        return;
                    }

                    showContactPreviewModal(
                        getMergedContact(selectedContacts),
                        getPreviewMergeCallback(group, groupName, mergeGroupSuccess)
                    );
                },
                onClickClose() {
                    contactMergerModal.deactivate();
                }
            }
        });
    }
/**
     * Open the confirm merge contacts modal
     * Let the user pick contacts to merge
     * And then call the merge function
     * @param {Object} duplicates
     */
Open the confirm merge contacts modal
Let the user pick contacts to merge
And then call the merge function
@param {Object} duplicates
Open the confirm merge contacts modal Let the user pick contacts to merge And then call the merge function @param { Object } duplicates
function showMergeModal(duplicates) {
        contactMergerModal.activate({
            params: {
                title: I18N.mergeContacts,
                duplicates,
                onClickMerge(groups = {}) {
                    doMerge(groups).catch(() => {});
                    contactMergerModal.deactivate();
                },
                onClickDetails(selection) {
                    showContactDisplayModal(selection.vCard);
                },
                onClickPreview(group = [], groupName = '', mergeGroupSuccess) {
                    const selectedContacts = group.filter(({ selected }) => selected);
                    if (selectedContacts.length <= 1) {
                        return;
                    }
                    showContactPreviewModal(
                        getMergedContact(selectedContacts),
                        getPreviewMergeCallback(group, groupName, mergeGroupSuccess)
                    );
                },
                onClickClose() {
                    contactMergerModal.deactivate();
                }
            }
        });
    }
function showMergeModal ( duplicates ) { contactMergerModal . activate ( { params : { title : I18N . mergeContacts , duplicates , onClickMerge ( groups = { } ) { doMerge ( groups ) . catch ( ( ) => { } ) ; contactMergerModal . deactivate ( ) ; } , onClickDetails ( selection ) { showContactDisplayModal ( selection . vCard ) ; } , onClickPreview ( group = [ ] , groupName = '' , mergeGroupSuccess ) { const selectedContacts = group . filter ( ( { selected } ) => selected ) ; if ( selectedContacts . length <= 1 ) { return ; } showContactPreviewModal ( getMergedContact ( selectedContacts ) , getPreviewMergeCallback ( group , groupName , mergeGroupSuccess ) ) ; } , onClickClose ( ) { contactMergerModal . deactivate ( ) ; } } } ) ; }
Open the confirm merge contacts modal
 Let the user pick contacts to merge
 And then call the merge function
 @param {Object} duplicates
Open the confirm merge contacts modal Let the user pick contacts to merge And then call the merge function @param { Object } duplicates