import { QueryList, ChangeDetectorRef, ElementRef, SimpleChanges, OnDestroy } from '@angular/core';
import { MetadataHistoryManager } from '@anglr/dynamic';
import { Dictionary } from '@jscrpt/common';
import { Observable, Subject, Subscription } from 'rxjs';
import { Coordinates, RelationsInput, RelationsNode, RelationsNodeMetadata, RelationsOutput } from '../interfaces';
import { RelationsCanvasSAComponent } from './relationsCanvas/relationsCanvas.component';
import * as i0 from "@angular/core";
/**
 * Base class for relations node components
 */
export declare abstract class RelationsNodeBase<TOptions = any, TEditorOptions = any> implements RelationsNode<TOptions, TEditorOptions>, OnDestroy {
    protected changeDetector: ChangeDetectorRef;
    protected element: ElementRef<HTMLElement>;
    protected canvas: RelationsCanvasSAComponent;
    /**
     * Canvas position change subscription
     */
    protected canvasPositionChangeSubscription: Subscription | null | undefined;
    /**
     * Instance of resize observer
     */
    protected observer: ResizeObserver;
    /**
     * Metadata history manager
     */
    protected history: MetadataHistoryManager<RelationsNodeMetadata[]>;
    /**
     * Indication whether is node initialized
     */
    protected initialized: boolean;
    /**
     * Indication whether user is dragging
     */
    protected isDragging: boolean;
    /**
     * Indication whether user moved node during drag
     */
    protected moved: boolean;
    /**
     * Last mouse down position
     */
    protected lastMouseMovePosition: Coordinates;
    /**
     * Last mouse down offset position
     */
    protected lastMouseDownOffset: Coordinates;
    /**
     * Node position
     */
    protected nodePosition: Coordinates;
    /**
     * Array of all available outputs
     */
    protected ɵAllOutputs: readonly RelationsOutput[];
    /**
     * Object storing inputs by their names
     */
    protected ɵInputs: Dictionary<RelationsInput>;
    /**
     * Object storing outputs by their names
     */
    protected ɵOutputs: Dictionary<RelationsOutput>;
    /**
     * Subject used for destroying node by user
     */
    protected destroySubject: Subject<void>;
    /**
     * Relations node inputs
     */
    protected inputsChildren: QueryList<RelationsInput>;
    /**
     * Relations node outputs
     */
    protected outputsChildren: QueryList<RelationsOutput>;
    /**
     * @inheritdoc
     */
    zoomLevel: number;
    /**
     * @inheritdoc
     */
    get id(): string;
    /**
     * @inheritdoc
     */
    metadata: RelationsNodeMetadata<TOptions, TEditorOptions> | undefined | null;
    /**
     * @inheritdoc
     */
    get allOutputs(): readonly RelationsOutput[];
    /**
     * @inheritdoc
     */
    get inputs(): Dictionary<RelationsInput>;
    /**
     * @inheritdoc
     */
    get outputs(): Dictionary<RelationsOutput>;
    /**
     * @inheritdoc
     */
    get destroy(): Observable<void>;
    /**
     * Node bounding box
     */
    get boundingBox(): DOMRect;
    constructor(changeDetector: ChangeDetectorRef, element: ElementRef<HTMLElement>);
    /**
     * Called when input value changes
     */
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Called when component is destroyed
     */
    ngOnDestroy(): void;
    /**
     * @inheritdoc
     */
    invalidateVisuals(): void;
    /**
     * @inheritdoc
     */
    initialize(): void;
    /**
     * Mouse down event
     * @param event
     */
    protected onMouseDown(event: MouseEvent): void;
    /**
     * Mouse move event
     * @param event
     */
    protected onMouseMove(event: MouseEvent): void;
    /**
     * Mouse up event
     * @param event
     */
    protected onMouseUp(event: MouseEvent): void;
    /**
     * Initialize endpoints
     */
    protected initEndpoints(): void;
    /**
     * Updates node relations
     */
    protected updateRelations(): void;
    /**
     * Updates node position
     */
    protected updatePosition(): void;
    /**
     * Allows code to be called after metadata were set
     */
    protected metadataSet(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<RelationsNodeBase<any, any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<RelationsNodeBase<any, any>, never, never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=relationsNodeBase.d.ts.map