import { IUiSettingsClient } from 'src/core/public' ; import { IStorageWrapper } from 'src/plugins/opensearch_dashboards_utils/public' ; import { TimeHistory , Timefilter , TimeHistoryContract , TimefilterContract } from './index' ; import { UI_SETTINGS } from '../../../common' ; internal export interface TimeFilterServiceDependencies { uiSettings : IUiSettingsClient ; storage : IStorageWrapper ; } export class TimefilterService { public setup ( { uiSettings , storage } ) { const timefilterConfig = { timeDefaults : uiSettings . get ( UI_SETTINGS . TIMEPICKER_TIME_DEFAULTS ) , refreshIntervalDefaults : uiSettings . get ( UI_SETTINGS . TIMEPICKER_REFRESH_INTERVAL_DEFAULTS ) , } ; const history = new TimeHistory ( storage ) ; const timefilter = new Timefilter ( timefilterConfig , history ) ; return { timefilter , history , } ; } public start ( ) { } public stop ( ) { } } public export interface TimefilterSetup { timefilter : TimefilterContract ; history : TimeHistoryContract ; }