1 | import React from 'react';
|
2 | import { View } from 'react-native';
|
3 | import { NativeAdIconView } from './AdIconView';
|
4 | import { NativeAdMediaView } from './AdMediaView';
|
5 | import AdsManager from './NativeAdsManager';
|
6 | declare type AdContainerProps<P> = {
|
7 | adsManager: AdsManager;
|
8 | onAdLoaded?: ((ad: NativeAd) => void) | null;
|
9 | onError?: (error: Error) => void;
|
10 | } & Pick<P, Exclude<keyof P, keyof AdProps>>;
|
11 | declare type AdProps = {
|
12 | nativeAd: NativeAd;
|
13 | };
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export default function withNativeAd<P>(Component: React.ComponentType<P & AdProps>): React.ComponentType<AdContainerProps<P>>;
|
22 | declare type NativeAdViewProps = {
|
23 | adsManager: string;
|
24 | onAdLoaded?: (event: {
|
25 | nativeEvent: NativeAd;
|
26 | }) => void;
|
27 | } & React.ComponentProps<typeof View>;
|
28 | declare type NativeAdView = React.Component<NativeAdViewProps>;
|
29 | declare const NativeAdView: React.ComponentType<any>;
|
30 | export declare type AdIconViewContextValue = {
|
31 | nativeRef: (component: NativeAdMediaView | null) => void;
|
32 | };
|
33 | export declare type AdMediaViewContextValue = {
|
34 | nativeRef: (component: NativeAdIconView | null) => void;
|
35 | };
|
36 | export declare type AdTriggerViewContextValue = {
|
37 | registerComponent: (component: React.Component) => void;
|
38 | unregisterComponent: (component: React.Component) => void;
|
39 | onTriggerAd: () => void;
|
40 | };
|
41 | export declare type AdOptionsViewContextValue = {
|
42 | nativeAdViewRef: React.RefObject<NativeAdView>;
|
43 | };
|
44 | export declare const AdIconViewContext: React.Context<AdIconViewContextValue | null>;
|
45 | export declare const AdMediaViewContext: React.Context<AdMediaViewContextValue | null>;
|
46 | export declare const AdTriggerViewContext: React.Context<AdTriggerViewContextValue | null>;
|
47 | export declare const AdOptionsViewContext: React.Context<AdOptionsViewContextValue | null>;
|
48 | export declare type NativeAd = {
|
49 | |
50 |
|
51 |
|
52 |
|
53 | headline?: string;
|
54 | |
55 |
|
56 |
|
57 | linkDescription?: string;
|
58 | |
59 |
|
60 |
|
61 | advertiserName?: string;
|
62 | |
63 |
|
64 |
|
65 | socialContext?: string;
|
66 | |
67 |
|
68 |
|
69 | callToActionText?: string;
|
70 | |
71 |
|
72 |
|
73 |
|
74 | bodyText?: string;
|
75 | |
76 |
|
77 |
|
78 | adTranslation?: string;
|
79 | |
80 |
|
81 |
|
82 | promotedTranslation?: string;
|
83 | |
84 |
|
85 |
|
86 | sponsoredTranslation?: string;
|
87 | };
|
88 | export {};
|