import type { PopupType } from "./embed.js"; import { type TIPLINK_BUILD_ENV_TYPE } from "./interfaces.js"; export declare enum CallbackType { DEFAULT = 0, POST = 1 } export type WindowCallbacks = { [key: string]: { type: CallbackType; cb: (data: any) => Promise; }; }; export type CloseFn = () => void; export type PostFn = (data: any, publicKeyOverride?: string) => void; export type WindowOpenParams = { popup: Window; url: URL; windowName: string; dimensions: { x: number; y: number; width: number; height: number; }; }; export declare class WindowCommunicator { private readonly baseUrl; private publicKey?; private windowOpenFailHandler; constructor(buildEnv: TIPLINK_BUILD_ENV_TYPE, windowOpenFailHandler: (onAlertClick: () => void, onAlertClose: () => void, popupType: PopupType) => void); updatePublicKey(publicKey: string): void; post: (window: Window, data: any, publicKeyOverride?: string) => void; singlePostToWindow: (window: Window, data: any) => void; private setupWindowWithMessages; setupHandshakeWithIframe(iFrame: HTMLIFrameElement, windowCallbacks: WindowCallbacks, endSignals: string[], requestId?: string): { post: PostFn; close: CloseFn; }; openPopup(path: string): WindowOpenParams; setupHandshakeWithWindowParams(windowOpenParams: WindowOpenParams, windowCallbacks: WindowCallbacks, endSignals: string[]): Promise<{ post: PostFn; close: CloseFn; }>; sleep: (ms: number) => Promise; } //# sourceMappingURL=window.d.ts.map