import { EventSubscription } from 'fbemitter'; import React, { type ReactNode } from 'react'; import { type AdIconViewContextValueType, type ComponentOrClass, type MediaViewContextValueType, type TriggerableContextValueType } from './contexts'; import { type HasNativeAd, type NativeAd } from './nativeAd'; import AdsManager from './NativeAdsManager'; export interface NativeAdViewProps { adsManager: string; onAdLoaded: (args: { nativeEvent: NativeAd; }) => void; } export interface AdWrapperState { ad?: NativeAd; canRequestAds: boolean; mediaViewNodeHandle: number; adIconViewNodeHandle: number; clickableChildren: Set; } export interface AdWrapperProps { adsManager: AdsManager; onAdLoaded?: (ad: NativeAd) => void; } declare const _default: (Component: React.ComponentType) => { new (props: AdWrapperProps & T): { subscription?: EventSubscription | undefined; subscriptionError?: EventSubscription | undefined; nativeAdViewRef?: React.Component | null | undefined; registerFunctionsForTriggerables: TriggerableContextValueType; registerFunctionsForMediaView: MediaViewContextValueType; registerFunctionsForAdIconView: AdIconViewContextValueType; clickableChildrenNodeHandles: Map; /** * On init, register for updates on `adsManager` to know when it becomes available */ componentDidMount(): void; componentDidUpdate(_: AdWrapperProps, prevState: AdWrapperState): void; /** * Clear subscription when component goes off screen */ componentWillUnmount(): void; registerMediaView: (mediaView: ComponentOrClass) => void; unregisterMediaView: () => void; registerAdIconView: (adIconView: ComponentOrClass) => void; unregisterAdIconView: () => void; registerClickableChild: (child: ComponentOrClass) => void; unregisterClickableChild: (child: ComponentOrClass) => void; handleAdUpdated: () => void | undefined; handleAdLoaded: ({ nativeEvent }: { nativeEvent: NativeAd; }) => void; handleNativeAdViewMount: (ref: React.Component | null) => void; renderAdComponent(componentProps: T): ReactNode; render(): React.JSX.Element | null; context: any; setState(state: AdWrapperState | ((prevState: Readonly, props: Readonly) => AdWrapperState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & Readonly<{ children?: React.ReactNode; }>; state: Readonly; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; }; contextType?: React.Context | undefined; }; export default _default; //# sourceMappingURL=withNativeAd.d.ts.map