import { OnInit, TemplateRef } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { CacheService } from '../../core/cache.service';
import { TelemetryService } from '../../core/telemetry.service';
import { DialogService } from '../dialog/dialog.service';
import { TooltipComponent } from './../tooltip/tooltip.component';
import { TooltipService } from './../tooltip/tooltip.service';
import { TourStep } from './tour-types';
import { TourService } from './tour.service';
import * as i0 from "@angular/core";
export declare class TourComponent implements OnInit {
    private tourService;
    private tooltipService;
    private telemetryService;
    private cacheService;
    private dialogService;
    private translateService;
    private document;
    /** Current tour step being shown to the user. The custom content in the template is bound to properties on this and therefor needs to be
    *  its own property. The exitStep is a tour step and this will hold that step at the end of the tour.
    */
    currentTourStep?: TourStep;
    /** Used to tell the UI that the step being shown is an exit step. This will change the
     *  link text and the action when clicked
     */
    showDoneButton: boolean;
    /** Reference to the tooltip used for the tour steps */
    tooltip?: TooltipComponent;
    /** Array of tours provided when the start tour event was detected */
    private tours;
    private currentStepIndex;
    private currentTourIndex;
    /** Used to know if the restore step should be triggered when the tour is dismissed */
    private isAutoStart;
    private destroyed;
    custom: TemplateRef<any>;
    constructor(tourService: TourService, tooltipService: TooltipService, telemetryService: TelemetryService, cacheService: CacheService, dialogService: DialogService, translateService: TranslateService, document: Document);
    ngOnInit(): void;
    ngOnDestroy(): void;
    /**
     * Called when a restore step has been completed
     */
    done(): Promise<void>;
    /**
     * Called when a tour begins and when the user clicks next on the current tour step. It will handle any after click actions and then
     * find the next step and present it to the user and transition to a restore step or new tour if needed.
     */
    showNextStep(): Promise<void>;
    private setupTourComponent;
    /**
     * Shows a tour and emits an event that it was started
     * @param tour
     */
    private showNextTour;
    private endTour;
    /**
     * Displays a tooltip for the current tour step
     */
    private showStepTooltip;
    /**
     * Subscribes to the tooltips onHide event emitter and reacts if the user dismisses the tooltip
     */
    private subscribeToTooltipOnHide;
    /**
     * Loops through the current tour steps starting after the current step index. It will try to find a visible
     * selector and if so return the index.
     * @returns
     */
    private getNextAvailableStepIndex;
    /**
     * Try to find the tour step element to know if it is visible for the user. Check for the clickBefore first if defined
     * @param anchor
     * @returns
     */
    private stepElementFound;
    /**
     * Some tour steps may have a click after defined. If so call the click method on the html element
     */
    private handleClickAfter;
    /**
     * Some tour steps may have a click before defined. If so call the click method on the html element
     */
    private handleClickBefore;
    /**
    * Checks for an exit step on the current tour and if found displays the step
    */
    private handleExitStep;
    /**
     * Try to find the element with the selector provided and if so click it. This is how tour steps will open/close menus to
     * give a tour to the user
     * @param selector
     */
    private clickElementIfFound;
    /**
     * When auto starting tours we will want to remove any that have the local storage key written as completed so
     * they are not presented to the user again.
     * @param tours
     * @returns
     */
    private removeCompletedTours;
    /**
     * Writes a key to local storage so the tour will not be shown again automatically
     */
    private writeCompletionKey;
    /**
     * When dismissing a tour or one being dismissed via a navigation event, etc we will want to mark
     * every tour in the array as completed so it doesn't resurface unless the user requests the tour.
     * This function will loop over all and write the local storage key
     */
    private writeCompletionKeyForAllTours;
    /**
     * Cache key used to set/get the completion status of a tour
     * @param tour
     * @returns
     */
    private makeCacheKey;
    /**
     * Removes a tooltip from the view, used when switching tour steps and closing a tour
     */
    private removeTooltip;
    /**
     * Returns the tour based on the current index
     */
    private get currentTour();
    /**
     * The click before/after and show tooltip functions need to be wrapped in setTimeout for the UI
     * to operate correctly but setTimeout is an action we cannot await so we're wrapping it in a promise to return
     * so the function calls can await the action
     * @param fn
     * @returns
     */
    private waitForTimeout;
    /**
     * Find the "next" or "done" button and focus on it.
     *
     * They are mutually exclusive, so if we cannot find the next button
     * we look for the done button.
     */
    private focusOnNextOrDoneButton;
    /**
     * Find an element with given selector and focus on it.
     * Return false if element not found.
     */
    private focusOnElement;
    static ɵfac: i0.ɵɵFactoryDeclaration<TourComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TourComponent, "ec-tour", never, {}, {}, never, never, false, never>;
}
