import { Subject } from 'rxjs';
import { TranslatableString } from '@siemens/element-translate-ng/translate';
import * as i0 from '@angular/core';

/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */

/** Common options for tour step and as default for tour step */
interface TourStepCommonOptions {
    /** Whether Scroll the element into view. */
    scrollTo?: boolean | ScrollIntoViewOptions;
    /** Custom handler to perform scrolling. */
    scrollToHandler?: (element: HTMLElement) => void;
    /**
     * A function that returns a promise.
     * When the promise resolves, the step will be shown. E.g. use this to open
     * dialogs, etc.
     */
    beforeShowPromise?: () => Promise<any>;
    /**
     * A function that returns a promise.
     * When the promise resolves, the next step will be shown. This can be used
     * to 'clean up' action from `beforeShowPromise`.
     */
    beforeNextPromise?: () => Promise<any>;
}
/** Options for each tour step. */
interface TourStep extends TourStepCommonOptions {
    /** Unique id for the step. Exposed in DOM as `data-step-id` */
    id?: string;
    /** Title to be displayed on the modal. */
    title: TranslatableString;
    /** Body text of the modal. */
    text?: TranslatableString;
    /** The element, the step should be attached to on the page. */
    attachTo?: {
        element: string | HTMLElement | (() => string | HTMLElement);
    };
}
/** Options for tour */
interface TourOptions {
    /** Default options applied to all tour steps. */
    defaultStepOptions?: TourStepCommonOptions;
}

declare class SiTourService {
    private injector;
    private resizeObserver;
    private overlay;
    private outsideClickDispatcher;
    private overlayRefHighlight?;
    private overlayRef?;
    private portal?;
    private options;
    private steps;
    private currentStepIndex;
    private currentStep?;
    private active;
    private tourToken;
    private positionChangeSub?;
    private resizeSub?;
    private document;
    constructor();
    /**
     * Event triggered after the tour is completed.
     */
    readonly onTourComplete: Subject<void>;
    /**
     * Event triggered after the tour is cancelled, either through skip button or closing the tour dialog.
     */
    readonly onTourCancel: Subject<void>;
    /**
     * Sets options for the whole tour.
     */
    setOptions(options: TourOptions): void;
    /**
     * Add steps to the tour
     */
    addSteps(steps: TourStep[]): void;
    /**
     * Clear all steps
     */
    clearSteps(): void;
    /**
     * Start the tour
     */
    start(): void;
    /**
     * Finish the tour
     */
    complete(): void;
    private controlAction;
    private makeStep;
    private scrollIntoView;
    private handleBeforeNextPromise;
    private centerOverlay;
    private attachOverlay;
    private createFlexiblePositionStrategy;
    private createOrUpdateOverlays;
    private handleResizeSubscription;
    private isElementVisible;
    private getElement;
    private hide;
    static ɵfac: i0.ɵɵFactoryDeclaration<SiTourService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SiTourService>;
}

export { SiTourService };
export type { TourOptions, TourStep, TourStepCommonOptions };
