import { TelemetrySavedObject } from './types' ; interface NotifyOpts { allowChangingOptInStatus : boolean ; telemetrySavedObject : TelemetrySavedObject ; telemetryOptedIn : boolean | null ; configTelemetryOptIn : boolean ; } export function getNotifyUserAboutOptInDefault ( { allowChangingOptInStatus , telemetrySavedObject , telemetryOptedIn , configTelemetryOptIn , } ) { if ( allowChangingOptInStatus === false ) { return false ; } if ( telemetrySavedObject && telemetrySavedObject . userHasSeenNotice === true ) { return false ; } return telemetryOptedIn === true && configTelemetryOptIn === true ; }