import React from 'react'; export interface FmlLifeCycleContextInterface { onFmlViewWillEnter: (callback: () => void) => void; fmlViewWillEnter: () => void; onFmlViewDidEnter: (callback: () => void) => void; fmlViewDidEnter: () => void; onFmlViewWillLeave: (callback: () => void) => void; fmlViewWillLeave: () => void; onFmlViewDidLeave: (callback: () => void) => void; fmlViewDidLeave: () => void; cleanupFmlViewWillEnter: (callback: () => void) => void; cleanupFmlViewDidEnter: (callback: () => void) => void; cleanupFmlViewWillLeave: (callback: () => void) => void; cleanupFmlViewDidLeave: (callback: () => void) => void; } export declare const FmlLifeCycleContext: React.Context; export interface LifeCycleCallback { (): void | (() => void | undefined); id?: number; } export interface LifeCycleDestructor { id: number; destructor: ReturnType; } export declare const DefaultFmlLifeCycleContext: { new (): { fmlViewWillEnterCallbacks: LifeCycleCallback[]; fmlViewDidEnterCallbacks: LifeCycleCallback[]; fmlViewWillLeaveCallbacks: LifeCycleCallback[]; fmlViewDidLeaveCallbacks: LifeCycleCallback[]; componentCanBeDestroyedCallback?: (() => void) | undefined; fmlViewWillEnterDestructorCallbacks: LifeCycleDestructor[]; fmlViewDidEnterDestructorCallbacks: LifeCycleDestructor[]; fmlViewWillLeaveDestructorCallbacks: LifeCycleDestructor[]; fmlViewDidLeaveDestructorCallbacks: LifeCycleDestructor[]; onFmlViewWillEnter(callback: LifeCycleCallback): void; teardownCallback(callback: LifeCycleCallback, callbacks: any[]): void; /** * Tears down the user-provided fmlViewWillEnter lifecycle callback. * This is the same behavior as React's useEffect hook. The callback * is invoked when the component is unmounted. */ cleanupFmlViewWillEnter(callback: LifeCycleCallback): void; /** * Tears down the user-provided fmlViewDidEnter lifecycle callback. * This is the same behavior as React's useEffect hook. The callback * is invoked when the component is unmounted. */ cleanupFmlViewDidEnter(callback: LifeCycleCallback): void; /** * Tears down the user-provided fmlViewWillLeave lifecycle callback. * This is the same behavior as React's useEffect hook. The callback * is invoked when the component is unmounted. */ cleanupFmlViewWillLeave(callback: LifeCycleCallback): void; /** * Tears down the user-provided fmlViewDidLeave lifecycle callback. * This is the same behavior as React's useEffect hook. The callback * is invoked when the component is unmounted. */ cleanupFmlViewDidLeave(callback: LifeCycleCallback): void; fmlViewWillEnter(): void; onFmlViewDidEnter(callback: LifeCycleCallback): void; fmlViewDidEnter(): void; onFmlViewWillLeave(callback: LifeCycleCallback): void; fmlViewWillLeave(): void; onFmlViewDidLeave(callback: LifeCycleCallback): void; fmlViewDidLeave(): void; onComponentCanBeDestroyed(callback: () => void): void; componentCanBeDestroyed(): void; }; };