import * as i0 from '@angular/core'; import { TemplateRef, ApplicationRef, Injector, ElementRef, EventEmitter, SimpleChanges } from '@angular/core'; import { Portal } from '@angular/cdk/portal'; import { IPoint2D } from '@obliczeniowo/elementary/classes'; import { OblResizeWindowService } from '@obliczeniowo/elementary/resize-window'; import { Subject } from 'rxjs'; import * as i3 from '@angular/common'; import * as i4 from '@angular/cdk/overlay'; import * as i5 from '@obliczeniowo/elementary/icons'; import * as i6 from '@obliczeniowo/elementary/text-pipes'; interface MenuItem { id: string | number; icon?: string | TemplateRef; text: string; command: string; disabled?: boolean; } declare class OblMenuTeleportService { private readonly appRef; private readonly injector; private readonly portalOutlet; constructor(appRef: ApplicationRef, injector: Injector); registerPortalOutlet(outletElement: HTMLElement): number; unregisterPortalOutlet(id: number): void; teleport(id: number, portal: Portal): void; finishTeleportation(id: number): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class MenuComponent { private menuTeleportService; protected resize: OblResizeWindowService; protected elementRef: ElementRef; protected _opened: boolean; /** * Open/close menu. When set to false emits extra command 'on-close' only by using command Subject */ set opened(opened: boolean); get opened(): boolean; target: HTMLElement; items: MenuItem[]; /** * translations for item.text from {@link items} */ translations: { [en: string]: string; }; /** * emit command when active element was clicked */ clicked: EventEmitter; command: Subject; protected parent: HTMLDivElement; protected position: IPoint2D; protected size: { width: number; height: number; }; protected id: number; set content(elemRef: ElementRef); checkParent(target: HTMLElement | null | undefined): boolean; protected targetClicked: (event: MouseEvent) => void; constructor(menuTeleportService: OblMenuTeleportService, resize: OblResizeWindowService, elementRef: ElementRef); ngOnDestroy(): void; ngAfterViewChecked(): void; protected itemClicked(item: MenuItem): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MenuItemComponent { item: MenuItem; translations: { [english: string]: string; }; noIcon: boolean; clicked: EventEmitter; onClick(): void; get disabled(): boolean | undefined; ngOnChanges(changes: SimpleChanges): void; protected stringIcon(): boolean; protected iconTemplate(): TemplateRef; protected iconString(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MenuModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { MenuComponent, MenuModule }; export type { MenuItem };