import { Dispatch, SetStateAction } from 'react'; import { PanelPosition, PanelSizeExact } from './types'; export type OpenExternalWindowResponse = { externalWindow: Window | null; onCloseExternalWindow: (() => void) | null; }; /** * Open and scaffold the new external window. * * The main motivation for extracting these procedures into a function is for testing ease. JSDOM does not mock out the * entire window object, making the PopoutWindow component difficult to unit test without extensive mocking. Instead, we * can avoid mocking most of the window methods entirely by conditionally calling an alternative to `openExternalWindow` * during unit testing by providing a truthy `openExternalWindowFn` prop. */ export declare const openExternalWindow: ({ title, size, setContainerElement, setHeadElement, observeStyleChanges, className, position, }: { title: string; size: PanelSizeExact; setContainerElement: Dispatch>; setHeadElement: Dispatch>; observeStyleChanges?: boolean; className?: string; position: PanelPosition; }) => OpenExternalWindowResponse;