import React from 'react'; import H from 'history'; import { Logger } from 'typescript-log'; export interface PageLifecycleEvent { type: string; timeStamp: number; originator: string; payload: T; } export declare interface Properties { location: H.Location; [key: string]: any; } export interface PageLoadStarted extends PageLifecycleEvent { type: 'page-load-started'; } export interface PageLoadFailed extends PageLifecycleEvent { type: 'page-load-failed'; } export interface PageLoadComplete extends PageLifecycleEvent { type: 'page-load-complete'; } export declare type PageEvent = PageLoadStarted | PageLoadFailed | PageLoadComplete; export interface PageLifecycleProviderRenderProps { /** Increments loading count */ beginLoadingData: () => void; /** Decrements loading count */ endLoadingData: () => void; } export interface PageLifecycleProviderProps { children: React.ReactElement | ((pageProps: PageLifecycleProviderRenderProps) => React.ReactElement); onEvent: (event: PageEvent) => void; logger?: Logger; } export interface PageProperties extends PageLifecycleProviderRenderProps { currentPageProps: Array>; } export declare const PagePropertiesContext: React.Context; export declare const PageLifecycleProvider: React.FC;