import React from 'react' ; import { CoreStart } from 'opensearch-dashboards/public' ; import { OptedInNoticeBanner } from '../../components/opted_in_notice_banner' ; import { toMountPoint } from '../../../../opensearch_dashboards_react/public' ; interface RenderBannerConfig { overlays : CoreStart [ 'overlays' ] ; onSeen : ( ) => void ; } export function renderOptedInNoticeBanner ( { onSeen , overlays } ) { const mount = toMountPoint ( < OptedInNoticeBanner onSeenBanner = { onSeen } / > ) ; const bannerId = overlays . banners . add ( mount , 10000 ) ; return bannerId ; }