import { type ResizeCallback, type TBLExtraProperties, TBLPlacementType } from '../types'; import TemplateJS from './TemplateJS'; import type { TBLClassicListener } from './TBLClassicListener'; /** * TBLClassicUnitController manages the lifecycle and interactions * of a Taboola content unit within a React Native application. * * @class * @description * This controller handles: * - Unit initialization * - Event listener management * - Content fetching and refreshing * - Resize and interaction tracking * * Key Responsibilities: * - Manage native Taboola SDK unit interactions * - Handle event subscriptions for resize, clicks, and content updates * - Provide methods for unit manipulation (fetch, reset, refresh) */ declare class TBLClassicUnitController { unitId?: string; pageId: string; height: number; placement: string; templateJS?: TemplateJS; private mode; private placementType; private tblRNClassicUnitEventHandler?; private tblClassicListener; constructor(pageId: string, placement: string, mode: string, placementType: TBLPlacementType, tblClassicListener: TBLClassicListener); /** * Sets whether Taboola should handle organic clicks * @param shouldHandleOrganicClicks */ setShouldHandleOrganicClicks(shouldHandleOrganicClicks: boolean): void; /** * Fetches content for the current unit */ fetchContent(): void; /** * Resets the content unit to its initial state */ reset(): void; setUserId(userId: string): void; setTag(tag: string): void; setPageId(pageId: string): void; setTargetType(targetType: string): void; /** * Sets the publisher name for the unit (Android only) * @param publisherName - The publisher name to set */ setPublisherName(publisherName: string): void; /** * Sets the page type for the unit (Android only) * @param pageType - The page type to set */ setPageType(pageType: string): void; /** * Sets the page URL for the unit (Android only) * @param pageUrl - The page URL to set */ setPageUrl(pageUrl: string): void; setUnitExtraProperties(unitExtraProperties: TBLExtraProperties): void; refresh(): void; updateContent(): void; /** * Clears the unit, removing listeners and resetting state * Useful for component unmounting and cleanup */ clear(): void; /** * Sets the callback function that will be triggered when resize events occur. * This callback will receive resize event data including height changes. * * @param callback The function to call when resize events occur */ setResizeListener(callback: ResizeCallback): void; initialize(): Promise; } export default TBLClassicUnitController; //# sourceMappingURL=TBLClassicUnitController.d.ts.map