import { DashboardSavedObject } from '../..' ; import { SavedObject } from '../../services/saved_objects' ; import { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss' ; import type { TagDecoratedSavedObject } from '../../services/saved_objects_tagging_oss' ; function defaultTaggingGuard ( _obj ) { return false ; } export const getTagsFromSavedDashboard = ( savedDashboard , api ? ) => { const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard ( api ) ; return hasTaggingCapabilities ( savedDashboard ) ? savedDashboard . getTags ( ) : [ ] ; } ; export const getHasTaggingCapabilitiesGuard = ( api ? ) => api ?. ui . hasTagDecoration || defaultTaggingGuard ;