import type { PublicMethodsOf } from '@osd/utility-types' ; import { OverlayService , OverlayStart } from './overlay_service' ; import { overlayBannersServiceMock } from './banners/banners_service.mock' ; import { overlayFlyoutServiceMock } from './flyout/flyout_service.mock' ; import { overlayModalServiceMock } from './modal/modal_service.mock' ; const createStartContractMock = ( ) => { const overlayStart = overlayModalServiceMock . createStartContract ( ) ; const startContract = { openFlyout : overlayFlyoutServiceMock . createStartContract ( ) . open , openModal : overlayStart . open , openConfirm : overlayStart . openConfirm , banners : overlayBannersServiceMock . createStartContract ( ) , } ; return startContract ; } ; const createMock = ( ) => { const mocked = { start : jest . fn ( ) , } ; mocked . start . mockReturnValue ( createStartContractMock ( ) ) ; return mocked ; } ; export const overlayServiceMock = { create : createMock , createStartContract : createStartContractMock , } ;