import { NavigationExtras } from '@angular/router';
import { TranslatableString } from '@siemens/element-translate-ng/translate';
import * as rxjs from 'rxjs';
import * as _angular_core from '@angular/core';
import { InjectionToken, DoCheck, OnChanges, OnDestroy } from '@angular/core';

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

interface Link {
    /**
     * The title of the menu item. Can be either the title to be displayed or the translation key.
     */
    title?: TranslatableString;
    /**
     * The optional tooltip of the link. Can be either the text to be displayed or the
     * translation key.
     */
    tooltip?: TranslatableString;
    /**
     * Defines a href URI that the menu item will be linked to. Will be used to set the href attribute
     * of the a element. Will only be used if link and function is not set.
     */
    href?: string;
    /**
     * The target attribute specifies where to open the linked document. If no target is specified,
     * the link will open in the current tab.
     */
    target?: string;
    /**
     * Defines the link of the menu item within the application using the angular router link concept.
     * Accepts an array of `any` as per [routerLink API definition]{@link https://angular.dev/api/router/RouterLink}.
     */
    link?: any[] | string;
    /**
     * The navigation extras provide additional routing options when using the router link.
     */
    navigationExtras?: NavigationExtras;
    /**
     * A function that will be invoked when clicking on the menu item.
     * When passed as a string, use together with SiLinkActionService to receive events. This is
     * meant for repetitive things in lists/tables/etc.
     */
    action?: ((param?: any) => void | any) | string;
    /**
     * A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route.
     */
    isActive?: boolean;
    /**
     * A boolean that lets the link know whether it is disabled or not.
     */
    disabled?: boolean;
}
/**
 * Used in events emitted from SiLinkActionService
 */
interface LinkAction {
    link: Link;
    param: any;
}

declare class SiLinkActionService {
    private actionSubject;
    /**
     * Observable which emits the link and param to run the action on.
     *
     * @defaultValue this.actionSubject.asObservable()
     */
    readonly action$: rxjs.Observable<LinkAction>;
    /**
     * Emit a new link and param pair to run the action on.
     */
    emit(link: Link, param: any): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiLinkActionService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<SiLinkActionService>;
}

/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
/** */
type AriaCurrentType = 'page' | 'step' | 'location' | 'date' | 'time' | 'true';

declare const SI_LINK_DEFAULT_NAVIGATION_EXTRA: InjectionToken<NavigationExtras>;
declare class SiLinkDirective implements DoCheck, OnChanges, OnDestroy {
    readonly siLink: _angular_core.InputSignal<Link | undefined>;
    readonly siLinkDefaultTarget: _angular_core.InputSignal<string | undefined>;
    readonly actionParam: _angular_core.InputSignal<any>;
    readonly activeClass: _angular_core.InputSignal<string | undefined>;
    /** @defaultValue false */
    readonly exactMatch: _angular_core.InputSignalWithTransform<boolean, unknown>;
    /**
     * Type for `aria-current` to set if routerLink is active.
     */
    readonly ariaCurrent: _angular_core.InputSignal<AriaCurrentType | undefined>;
    readonly activeChange: _angular_core.OutputEmitterRef<boolean>;
    protected readonly href: _angular_core.WritableSignal<string | undefined>;
    protected readonly target: _angular_core.WritableSignal<string | undefined>;
    protected readonly title: _angular_core.WritableSignal<string | undefined>;
    protected readonly isAriaCurrent: _angular_core.Signal<AriaCurrentType | undefined>;
    /** @defaultValue false */
    readonly active: _angular_core.WritableSignal<boolean>;
    private readonly destroyer;
    private router;
    private activatedRoute;
    private locationStrategy;
    private translateService;
    private actionService;
    private defaultNavigationExtra;
    private get urlTree();
    private get navigationExtras();
    ngOnDestroy(): void;
    ngOnChanges(): void;
    ngDoCheck(): void;
    private subscribeRouter;
    private updateActiveByRouter;
    onClick(event: any): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiLinkDirective, never>;
    static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SiLinkDirective, "[siLink]", ["siLink"], { "siLink": { "alias": "siLink"; "required": false; "isSignal": true; }; "siLinkDefaultTarget": { "alias": "siLinkDefaultTarget"; "required": false; "isSignal": true; }; "actionParam": { "alias": "actionParam"; "required": false; "isSignal": true; }; "activeClass": { "alias": "activeClass"; "required": false; "isSignal": true; }; "exactMatch": { "alias": "exactMatch"; "required": false; "isSignal": true; }; "ariaCurrent": { "alias": "ariaCurrent"; "required": false; "isSignal": true; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
}

declare class SiLinkModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiLinkModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SiLinkModule, never, [typeof SiLinkDirective], [typeof SiLinkDirective]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<SiLinkModule>;
}

export { SI_LINK_DEFAULT_NAVIGATION_EXTRA, SiLinkActionService, SiLinkDirective, SiLinkModule };
export type { Link, LinkAction };
