import { ConnectedPosition, Overlay, ViewportRuler } from '@angular/cdk/overlay';
import { ElementRef, Injector, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
import { Subject } from 'rxjs';
import { Nullable, RtlService } from '@fundamental-ngx/cdk/utils';
import { BasePopoverClass } from '../base/base-popover.class';
import { PopoverBodyComponent } from '../popover-body/popover-body.component';
import { PopoverContainerDirective } from '../popover-container/popover-container.directive';
import * as i0 from "@angular/core";
export interface PopoverTemplate {
    container: ViewContainerRef;
    popoverBody: PopoverBodyComponent;
    template: TemplateRef<any>;
}
export declare class PopoverService extends BasePopoverClass {
    private _overlay;
    private _renderer;
    private _viewportRuler;
    private _injector;
    private _rtlService;
    private readonly _popoverContainer;
    /** String content displayed inside popover body */
    stringContent: Nullable<string>;
    /** Template content displayed inside popover body */
    templateContent: Nullable<TemplateRef<any>>;
    /** @hidden */
    _onLoad: Subject<ElementRef<any>>;
    /** @hidden */
    _mobile: boolean;
    /** @hidden */
    private _eventRef;
    /** @hidden */
    private _overlayRef;
    /** @hidden */
    private _refresh$;
    /** @hidden */
    private _stopCloseListening$;
    /** @hidden */
    private readonly _placementRefresh$;
    /** @hidden */
    private _popoverBody;
    /** @hidden */
    private _triggerElement;
    /** @hidden */
    private _lastActiveElement;
    /** @hidden */
    private _templateData;
    /** @hidden */
    private _placementContainer;
    /** @hidden */
    private _ignoreTriggers;
    /** @hidden */
    private _modalBodyClass;
    /** @hidden */
    private _modalTriggerClass;
    /** @hidden */
    private _isModal;
    /** An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing)  */
    private readonly _destroyRef;
    /** @hidden */
    private get _triggerHtmlElement();
    /** @hidden */
    constructor(_overlay: Overlay, _renderer: Renderer2, _viewportRuler: ViewportRuler, _injector: Injector, _rtlService: RtlService, _popoverContainer: PopoverContainerDirective);
    /**
     * Method initialising the popover service - should be called, after view is initialised, params:
     * - triggerElement - element, which is equivalent for cdkOverlayOrigin, or fd-popover-control,
     *   by default to this element the popover body will lbe appended and events on this element will trigger
     *   popover's  toggle
     * - config - configuration object - in this case the intention is to use inheritance of BasePopoverClass in component
     * - templateData - in case of having already PopoverBodyComponent, there is way to pass container, template containing
     *   PopoverComponent and PopoverComponent instance
     */
    initialise(triggerElement: ElementRef | HTMLElement, config?: BasePopoverClass, templateData?: PopoverTemplate | TemplateRef<void> | null): void;
    /** Closes the popover. */
    close(focusActiveElement?: boolean): void;
    /** Opens the popover. */
    open(): void;
    /** method updating template or text inside rendered PopoverBody */
    updateContent(stringContent: Nullable<string> | Nullable<TemplateRef<any>>, templateContent: Nullable<TemplateRef<any>>): void;
    /** Changes background theming when modal */
    /** @hidden */
    checkModalBackground(): void;
    /** Toggles the popover open state */
    toggle(openAction?: boolean, closeAction?: boolean): void;
    /**
     * Method called to change position of popover,
     * recommended to be used only when popover is opened, otherwise change position or cdkPlacement
     */
    applyNewPosition(positions: ConnectedPosition[]): void;
    /** Method called to refresh position of opened popover */
    refreshPosition(): void;
    /** Temporary sets the ignoring of the event triggers. */
    setIgnoreTriggers(ignore: boolean): void;
    /**
     * Method that sets configuration/options, it detects if there is something changed and overwrites them
     */
    refreshConfiguration(config: BasePopoverClass): void;
    /**
     * This method is intended to be called in order
     * to postpone the main functionality but be able
     * to enable it back in the future by initialise()
     */
    deactivate(): void;
    /** Refresh listeners on trigger element events */
    _refreshTriggerListeners(): void;
    /**
     * Updates trigger element and refreshes the listeners.
     * @param trigger Trigger element ref.
     */
    updateTriggerElement(trigger: ElementRef | HTMLElement): void;
    /** @hidden */
    private _normalizeTriggers;
    /** @hidden */
    private _getOverlayConfig;
    /** @hidden */
    private _listenOnResize;
    /** @hidden */
    private _getDirection;
    /** @hidden */
    private _getPositionStrategy;
    /** remove listeners from trigger element events */
    private _removeTriggerListeners;
    private _addModalOverlay;
    private _removeOverlay;
    /** Attach template containing popover body to overlay */
    private _attachTemplate;
    /** Create PopoverBodyComponent and attach it into overlay */
    private _attachBodyComponent;
    /** @hidden */
    private _listenForPositionChange;
    /** Subscribe to close events from CDK Overlay, to throw proper events, change values */
    private _listenOnClose;
    /** Listener for click events */
    private _outsideClicks$;
    /** @hidden */
    private _shouldClose;
    /** @hidden */
    private _targetIsPopoverMobileDialog;
    /** @hidden */
    private _getEventTarget;
    /** @hidden */
    private _triggerContainsTarget;
    /** @hidden */
    private _getPositions;
    /** @hidden */
    private _applyWidthOverlay;
    /** @hidden */
    private _passVariablesToBody;
    /** @hidden */
    private _getTriggerWidth;
    /** @hidden */
    private _getPopoverBody;
    /** @hidden */
    private _detectChanges;
    /** @hidden */
    private _focusFirstTabbableElement;
    /** @hidden */
    private _focusLastActiveElementBeforeOpen;
    static ɵfac: i0.ɵɵFactoryDeclaration<PopoverService, [null, null, null, null, { optional: true; }, { optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<PopoverService>;
}
