import React from 'react' ; import { i18n } from '@osd/i18n' ; import { DataViewComponent } from './components/data_view' ; import { InspectorViewDescription , InspectorViewProps } from '../../types' ; import { Adapters } from '../../../common' ; import { IUiSettingsClient } from '../../../../../core/public' ; export const getDataViewDescription = ( uiSettings ) : InspectorViewDescription => ( { title : i18n . translate ( 'inspector.data.dataTitle' , { defaultMessage : 'Data' , } ) , order : 10 , help : i18n . translate ( 'inspector.data.dataDescriptionTooltip' , { defaultMessage : 'View the data behind the visualization' , } ) , shouldShow ( adapters ) { return Boolean ( adapters . data ) ; } , component : ( props ) => ( < DataViewComponent { ... props } uiSettings = { uiSettings } / > ) , } ) ;