import React , { lazy , Suspense } from 'react' ; import { EuiLoadingSpinner } from '@elastic/eui' ; import type { TelemetryPluginSetup } from 'src/plugins/telemetry/public' ; import type TelemetryManagementSection from './telemetry_management_section' ; export type TelemetryManagementSectionWrapperProps = Omit < TelemetryManagementSection [ 'props' ] , 'telemetryService' | 'showAppliesSettingMessage' > ; const TelemetryManagementSectionComponent = lazy ( ( ) => import ( './telemetry_management_section' ) ) ; export function telemetryManagementSectionWrapper ( telemetryService ) { const TelemetryManagementSectionWrapper = ( props ) => ( < Suspense fallback = { < EuiLoadingSpinner / > } > < TelemetryManagementSectionComponent showAppliesSettingMessage = { true } telemetryService = { telemetryService } { ... props } /> < /Suspense>); return TelemetryManagementSectionWrapper ; }