import React from 'react'; export declare const PopupContext: React.Context<{ state: any; dispatch: React.Dispatch; }>; /** * * `PopupContext` and `PopupProvider` are used to globally show `Alert`, `Confirm` and `NetworkActivity`. Below are details and examples to dispatch the different actions. * * The examples below are interacting with the `AppWrapper` which contains a `PopupProvider` of this site. However, you can also set it up as follows: * * ``` * * ``` * * And then access it through the `PopupContext` via the many different ways of access a context. In this example I use `useContext` as follows: * * In addition, `usePopups` is a nice helper hook that provides easy to use funtions instead of the dispatch types. The below example is identical to the one above but uses the `usePopups` hook. * */ export declare const PopupProvider: React.FC; export interface showAlertData { title?: string; message?: string; onClick?(): void; buttonTitle?: string; } export interface showConfirmData { title?: string; message?: string; leftOnClick?(): void; leftTitle?: string; rightOnClick?(): void; rightTitle?: string; } export interface usePopupsFunctions { showAlert(d: showAlertData): any; hideAlert(): any; showConfirm(d: showConfirmData): any; hideConfirm(): any; showNetworkActivity(message: string): any; hideNetworkActivity(): any; } export declare const usePopups: () => usePopupsFunctions;