/* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiToolTip, EuiText, EuiSelect } from '@elastic/eui'; import { I18nProvider } from '@osd/i18n/react'; import { i18n } from '@osd/i18n'; export interface TimechartHeaderProps { /** * Format of date to be displayed */ dateFormat?: string; /** * Range of dates to be displayed */ timeRange?: { from: string; to: string; }; /** * Interval Options */ options: Array<{ text: string; value: string }>; /** * changes the interval */ onChangeInterval: (interval: string) => void; /** * selected interval */ stateInterval?: string | undefined; } export function TimechartHeader({ options, onChangeInterval, stateInterval, }: TimechartHeaderProps) { const handleIntervalChange = (e: React.ChangeEvent) => { onChangeInterval(e.target.value); }; return ( ); }