@@ -25,6 +25,7 @@ import CONST from '@src/CONST';
2525import ONYXKEYS from '@src/ONYXKEYS' ;
2626import ROUTES from '@src/ROUTES' ;
2727import BulkDuplicateHandler from './BulkDuplicateHandler' ;
28+ import BulkDuplicateReportHandler from './BulkDuplicateReportHandler' ;
2829import { useSearchActionsContext , useSearchStateContext } from './SearchContext' ;
2930import type { BulkPaySelectionData , SearchQueryJSON } from './types' ;
3031
@@ -38,7 +39,7 @@ function SearchBulkActionsButton({queryJSON}: SearchBulkActionsButtonProps) {
3839 // We need isSmallScreenWidth (not just shouldUseNarrowLayout) because DecisionModal requires it for correct modal type
3940 // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
4041 const { shouldUseNarrowLayout, isSmallScreenWidth} = useResponsiveLayout ( ) ;
41- const { selectedTransactions, areAllMatchingItemsSelected, shouldShowSelectAllMatchingItems} = useSearchStateContext ( ) ;
42+ const { selectedTransactions, selectedReports , areAllMatchingItemsSelected, shouldShowSelectAllMatchingItems} = useSearchStateContext ( ) ;
4243 const { selectAllMatchingItems} = useSearchActionsContext ( ) ;
4344 const kycWallRef = useContext ( KYCWallContext ) ;
4445 const { isAccountLocked} = useLockedAccountState ( ) ;
@@ -69,6 +70,8 @@ function SearchBulkActionsButton({queryJSON}: SearchBulkActionsButtonProps) {
6970 dismissRejectModalBasedOnAction,
7071 isDuplicateOptionVisible,
7172 setDuplicateHandler,
73+ isDuplicateReportOptionVisible,
74+ setDuplicateReportHandler,
7275 allTransactions,
7376 allReports,
7477 searchData,
@@ -114,6 +117,14 @@ function SearchBulkActionsButton({queryJSON}: SearchBulkActionsButtonProps) {
114117 onHandlerReady = { setDuplicateHandler }
115118 />
116119 ) }
120+ { isDuplicateReportOptionVisible && (
121+ < BulkDuplicateReportHandler
122+ selectedReports = { selectedReports }
123+ allReports = { allReports }
124+ searchData = { searchData }
125+ onHandlerReady = { setDuplicateReportHandler }
126+ />
127+ ) }
117128 < KYCWall
118129 ref = { kycWallRef }
119130 chatReportID = { currentSelectedReportID }
0 commit comments