import { SavedObjectLoader , SavedObjectOpenSearchDashboardsServices , } from '../../../saved_objects/public' ; import { createSavedSearchClass } from './_saved_search' ; export function createSavedSearchesLoader ( services ) { const SavedSearchClass = createSavedSearchClass ( services ) ; const savedSearchLoader = new SavedObjectLoader ( SavedSearchClass , services . savedObjectsClient ) ; savedSearchLoader . loaderProperties = { name : 'searches' , noun : 'Saved Search' , nouns : 'saved searches' , } ; savedSearchLoader . urlFor = ( id ) => ( id ? `#/view/${ encodeURIComponent ( id ) }` : '#/' ) ; return savedSearchLoader ; }