import { TranslatePipe } from '../pipes/translate.pipe'; import * as i0 from "@angular/core"; export declare class FacebookPixelService { protected translatePipe: TranslatePipe; /** localStorage key holding the ids of purchases already reported to Meta. */ private static readonly TRACKED_PURCHASES_KEY; /** How many order ids to remember; enough to cover a session, small enough to stay tiny. */ private static readonly TRACKED_PURCHASES_LIMIT; /** * Read the currency per event instead of caching it. * * This service is provided in root, so it is constructed during bootstrap - before * `currentCurrency` is written (that happens inside the async language/currency lookup). Reading * it once in a field meant first-time visitors reported every event in the fallback currency, and * switching currency mid-session never took effect. */ get currencyCode(): string; constructor(translatePipe: TranslatePipe); /** * Money is handled in minor units (Sylius stores cents); Meta expects a decimal amount. * Returns null when there is nothing sensible to report, so callers can skip the event rather * than send a 0 that would drag reported revenue down. */ private toDecimalAmount; /** * Records an order id as reported and answers whether this call is the first one for it. * * Payment callbacks fire from ngOnInit, so refreshing the callback URL, navigating back to it or * a gateway retry would otherwise send Purchase again and inflate Meta's order count. */ private claimPurchase; /** * Report a completed order to Meta. * * @param orderId order number - both the dedup key and the reported order_id * @param valueInMinorUnits order total in minor units (cents) * @param contentIds purchased product ids, optional * @param numItems item count, optional */ trackPurchase(orderId: any, valueInMinorUnits: any, contentIds?: any, numItems?: any): void; ViewContent(content_ids: any, content_category: any, content_name: any, content_type: any, value: any): void; AddToCart(content_ids: any, content_name: any, content_type: any, value: any): void; InitiateCheckout(content_category: any, content_ids: any, value: any): void; AddToWishlist(content_name: any, content_category: any, content_ids: any, value: any): void; /** * @deprecated Use {@link trackPurchase}, which takes the total in minor units. * * Retained so callers outside this library keep compiling; it routes through trackPurchase so * they also get the currency, deduplication and repeat-fire protection. `content_name` carried * the order id and `value` an already-divided decimal amount, hence the conversion back. */ Purchase(content_ids?: any, content_name?: any, content_type?: any, contents?: any, num_items?: any, value?: any): void; private lastPageViewUrl; private lastPageViewAt; /** * The pixel bootstrap sends a PageView when it initialises and the router sends one per * NavigationEnd. Depending on how quickly the store config resolves, both can land for the same * URL on first load and double-count traffic, so collapse repeats of the same URL. */ pageView(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }