import * as i0 from '@angular/core'; import { AfterViewInit, ElementRef } from '@angular/core'; import { RouterLinkActive } from '@angular/router'; import * as i1 from '@odx/angular'; import * as rxjs from 'rxjs'; import { Observable } from 'rxjs'; import { DynamicTextContent } from '@odx/angular/cdk/dynamic-view'; import * as _odx_angular_utils from '@odx/angular/utils'; import * as i1$1 from '@odx/angular/components/link'; /** * Represents a directive for a main menu button. * This directive is used to toggle the main menu. */ declare class MainMenuButtonDirective { private readonly mainMenuService; readonly element: i0.ElementRef; protected onClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Represents a directive for closing the main menu. */ declare class MainMenuCloseDirective { private readonly mainMenu; protected onClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Represents a directive for a main menu item. * This directive is used to define a main menu item. * Has host directives for disabled state, tabindex, and closing the main menu. * * @see {WithDisabledState} * @see {WithTabIndex} * @see {MainMenuCloseDirective} */ declare class MainMenuItemDirective { protected readonly routerLinkActive: RouterLinkActive | null; readonly element: i0.ElementRef; /** * Optionally specifies whether the menu item is selected. * If not specified, the menu item will not be selected. * * @type {boolean} * @default false */ isSelected: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_isSelected: unknown; } interface MainMenuLink { name: string; url: string; } /** * Provides control over the state of the main menu, allowing components to open, close, or toggle its visibility. * This service uses a BehaviorSubject to manage the open state and exposes an observable that emits the current state. */ declare class MainMenuService { private readonly isOpen$$; /** * An Observable that emits the current state of the menu's visibility. * It uses distinctUntilChanged to prevent unnecessary emissions when the state hasn't actually changed. * shareReplay is configured to cache the last value for any late subscribers. * * @emits {boolean} The current visibility state of the main menu. */ readonly isOpen$: rxjs.Observable; /** * Returns the current visibility state of the main menu. * * @returns {boolean} True if the menu is open, false otherwise. */ isOpen(): boolean; /** * Opens the main menu by setting its state to true. */ open(): void; /** * Closes the main menu by setting its state to false. */ close(): void; /** * Toggles the visibility state of the main menu. * * @param {boolean | undefined} forceState - If provided, the menu will be set to this specific state. If not provided, * the menu will toggle to the opposite of its current state. */ toggle(forceState?: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * The `MainMenuComponent` provides a comprehensive user interface component for displaying a navigation menu within an application. * It supports dynamic content for titles, subtitles, and copyright text, and can dynamically render additional links. * The menu includes animations for opening and closing states, and can be controlled programmatically or via user interaction. */ declare class MainMenuComponent implements AfterViewInit { private readonly takeUntilDestroyed; protected readonly mainMenuService: MainMenuService; protected readonly mainMenuLinks$: rxjs.Observable; protected readonly isOpen$: rxjs.Observable; readonly element: ElementRef; /** * Input property for the title of the menu. The content is dynamic, allowing complex content structures * like translations or custom components. * * @type {DynamicTextContent} */ title: DynamicTextContent; /** * Optional input property for the subtitle of the menu. * * @type {DynamicTextContent | null} * @default null */ subtitle?: DynamicTextContent | null; /** * Optional input property for the copyright text of the menu. * * @type {DynamicTextContent | null} * @default null */ copyright?: DynamicTextContent | null; /** * Input property to control the open state of the menu. Uses boolean transformation to handle true/false states. * Changing this property will toggle the menu's open state via the MainMenuService. * * @param {boolean} value - The open state of the menu. */ set isOpen(value: boolean); /** * Returns the current open state of the menu from the MainMenuService. * * @returns {boolean} `true` if the menu is open, `false` otherwise. */ get isOpen(): boolean; /** * Outputs the observable that tracks the open state of the menu. * * @emits {boolean} The open state of the menu. */ menuOpen: rxjs.Observable; menuInner: ElementRef; ngAfterViewInit(): void; /** * Closes the menu. */ close(): void; private slideMenuInner; private isPopoverElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isOpen: unknown; } interface MainMenuLinksConfig { dataProtectionUrl?: string | null; legalNoticeUrl: string | null; providerIdentificationUrl: string | null; termsAndConditionsUrl?: string | null; openSourceUrl?: string | null; statusUrl?: string | null; dynamicLinks?: Observable; } /** * Tokens generated to provide and inject `MainMenuLinksConfig`. These tokens are used to configure and access main menu links throughout the application. * * @exports * - `MainMenuLinksConfig` - Token for injecting the config. * - `MainMenuLinksDefaultConfig` - Default configuration for main menu links. * - `injectMainMenuLinksConfig` - Function to inject the config wherever needed. * - `provideMainMenuLinksConfig` - Provider function to configure and provide the config in Angular's DI system. * * @example * ```ts * // Providing main menu links in an Angular module * @NgModule({ * providers: [ * provideMainMenuLinksConfig({ * legalNoticeUrl: 'https://example.com/legalnotice', * providerIdentificationUrl: 'https://example.com/provideridentification', * }), * ], * }) * export class AppModule { } * * // Injecting and using the main menu links configuration in a component * @Component({ ... }) * export class MyComponent { * constructor(@Inject(MainMenuLinksConfig) private config: MainMenuLinksConfig) { * console.log('Legal Notice URL:', config.legalNoticeUrl); * } * } * ``` */ declare const MainMenuLinksConfig: i0.InjectionToken>; declare const MainMenuLinksDefaultConfig: MainMenuLinksConfig; declare const injectMainMenuLinksConfig: () => MainMenuLinksConfig; declare const provideMainMenuLinksConfig: >>(config: _odx_angular_utils.ConfigProvider, D>) => i0.FactoryProvider | i0.ValueProvider; declare class MainMenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { MainMenuButtonDirective, MainMenuCloseDirective, MainMenuComponent, MainMenuItemDirective, MainMenuLinksConfig, MainMenuLinksDefaultConfig, MainMenuModule, injectMainMenuLinksConfig, provideMainMenuLinksConfig };