import type { ReactElement } from 'react'; export type NativeAdPlacementConfig = { aspectRatio?: number; }; export type NativeAdWebSlotProps = { placement: string; width?: number; aspectRatio: number; }; export type NativeAdCatalog = { isEnabled: () => boolean; resolveAdUnitId: (placement: string, testNativeUnitId: string) => string; getPlacementConfig?: (placement: string) => NativeAdPlacementConfig | undefined; /** Web-only: AdSense (ou outro). Mobile ignora. */ renderWebSlot?: (props: NativeAdWebSlotProps) => ReactElement | null; }; let nativeAdCatalog: NativeAdCatalog | null = null; export function configureNativeAdCatalog(catalog: NativeAdCatalog): void { nativeAdCatalog = catalog; } export function getNativeAdCatalog(): NativeAdCatalog | null { return nativeAdCatalog; } export const DEFAULT_NATIVE_AD_PLACEMENT = 'discover_grid'; export const DEFAULT_NATIVE_AD_ASPECT_RATIO = 0.82;