export type RemoteAction = {
    /**
     * The RemoteAction is inspired by a plain redux action where the type is the
     * action identifier.
     *
     * @example
     *
     * ```json
     * {
     *      "type": "EVENT_SET_VISIBLE_WIDGETS",
     *      "payload": ["foo", "bar"],
     * }
     * ```
     */
    type: string;
    /**
     * The action payload itself.
     */
    payload: any;
};
/**
 * A custom hook to ease the exchange of postMessage events between iframes and the parent window.
 *
 * @param messagePrefix a custom prefix to limit the event listener for these events
 * @param onReceiveMessage a callback function triggered when a message is received
 * @deprecated Please use the {@link import('./useIncomingPostMessages')#default useIncomingPostMessages} and/or
 * {@link import('./usePostMessageSender')#default usePostMessageSender} hooks instead.
 */
declare const usePostMessage: (messagePrefix: string, onReceiveMessage?: (eventData: any) => void) => {
    sendMessageToParent: (message: RemoteAction) => void;
    sendMessageToWidget: (message: RemoteAction, targetFrames: HTMLIFrameElement | HTMLIFrameElement[]) => void;
};
export default usePostMessage;
