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; /** * 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; } /** 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; /** Optional image source to display. */ imgSrc?: string; /** Alt text for a provided image. */ imgAlt?: TranslatableString; /** CSS class applied to the image. */ imgClass?: string; /** * Sets the image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property. * @defaultValue 'scale-down' */ imgObjectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'; /** 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; /** * Event triggered after the tour is cancelled, either through skip button or closing the tour dialog. */ readonly onTourCancel: Subject; /** * 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; static ɵprov: i0.ɵɵInjectableDeclaration; } export { SiTourService }; export type { TourOptions, TourStep, TourStepCommonOptions };