import { untracked } from 'mobx' ; import type { NavNode } from '../shared/NodesManager/EntityTypes' ; import type { NavNodeViewService } from '../shared/NodesManager/NavNodeView/NavNodeViewService' ; import type { IElementsTreeFilter } from './useElementsTree' ; export function navigationTreeDuplicateFilter ( navNodeViewService ) { return ( node , children ) => { const { nodes , duplicates } = navNodeViewService . filterDuplicates ( children ) ; untracked ( ( ) => { navNodeViewService . logDuplicates ( node . id , duplicates ) ; } ) ; return nodes ; } ; }