import { ElementRef, OnDestroy } from '@angular/core'; import { Observable } from 'rxjs'; import { KitPlatformService } from '../kit-platform/kit-platform.service'; /** * Observe viewport intersection. * * Should be provided on a component or a directive. * * * ### Usage * * Provide `KitIntersectionService` on a component or a directive, that you want to observe. * * ```typescript * \@Component({ * ... * providers: [ * KitIntersectionService, * ], * }) * export class TestComponent { * constructor(private intersection: KitIntersectionService) { * } * ... * // Check * const visible = this.instersection.isIntersecting; * ... * // Observe * this.instersection.observe().subscribe(isIntersecting => { * }); * } * ``` */ export declare class KitIntersectionService implements OnDestroy { private elementRef; private platform; private observer; private io; constructor(elementRef: ElementRef, platform: KitPlatformService); readonly isIntersecting: boolean; ngOnDestroy(): void; observe(): Observable; private initObserver; }