import { ElementRef, EventEmitter, Injector, NgZone, OnDestroy, OnInit } from '@angular/core';
import { LayoutComponentMetadata } from '@anglr/dynamic/layout';
import { DndService, DragSource, DropTarget, DropTargetMonitor } from '@ng-dnd/core';
import { Subscription } from 'rxjs';
import { LayoutComponentDragData } from '../../../../interfaces';
import { DragActiveService, LayoutEditorMetadataManager } from '../../../../services';
import { DndBusService, DropPlaceholderPreview } from '../../services';
import { LayoutDragItem, LayoutDropResult } from '../dndCoreDesigner/dndCoreDesigner.interface';
import * as i0 from "@angular/core";
/**
 * Directive used for initializing and handling dnd core functionality for layout component tree item
 */
export declare class DndCoreTreeItemDirective implements OnInit, OnDestroy {
    protected dnd: DndService;
    protected designerElement: ElementRef<HTMLElement>;
    protected draggingSvc: DragActiveService;
    protected manager: LayoutEditorMetadataManager;
    protected bus: DndBusService;
    protected zone: NgZone;
    protected injector: Injector;
    protected _manager: LayoutEditorMetadataManager;
    protected document: Document;
    /**
     * Current metadata for this component
     */
    protected get metadata(): LayoutComponentMetadata;
    /**
     * Gets indication whether component can accept drop
     */
    get canDrop(): boolean;
    /**
     * Subscriptions created during initialization
     */
    protected initSubscriptions: Subscription;
    /**
     * Subscription for placeholder connection to DOM
     */
    protected placeholderConnection: Subscription | undefined | null;
    /**
     * Subscription for container connection to DOM
     */
    protected containerConnection: Subscription | undefined | null;
    /**
     * Element that represents placeholder preview
     */
    protected placeholderPreviewElement: HTMLElement | undefined | null;
    /**
     * Drop zone target that handles drop of component
     */
    protected placeholderDrop: DropTarget<LayoutDragItem, LayoutDropResult>;
    /**
     * Drop zone target that handles drop of component
     */
    protected containerDrop: DropTarget<LayoutDragItem, LayoutDropResult>;
    /**
     * Drag source used for dragging component
     */
    drag: DragSource<LayoutDragItem, LayoutDropResult>;
    /**
     * Drop zone target that handles drop of component
     */
    dropzone: DropTarget<LayoutDragItem, LayoutDropResult>;
    /**
     * Html element that represents dropzone
     */
    dropzoneElement: HTMLElement;
    /**
     * Html element that represents children container
     */
    containerElement: HTMLElement;
    /**
     * Instance of drag data for this component
     */
    dragData: LayoutComponentDragData;
    /**
     * Indication whether is drag disabled
     */
    dragDisabled: boolean;
    /**
     * Occurs when metadata are dropped here
     */
    dropMetadata: EventEmitter<LayoutComponentDragData>;
    constructor(dnd: DndService, designerElement: ElementRef<HTMLElement>, draggingSvc: DragActiveService, manager: LayoutEditorMetadataManager, bus: DndBusService, zone: NgZone, injector: Injector, _manager: LayoutEditorMetadataManager, document: Document);
    /**
     * Initialize component
     */
    ngOnInit(): void;
    /**
     * Called when component is destroyed
     */
    ngOnDestroy(): void;
    /**
     * Gets drop coordinates
     * @param monitor - Monitor containing information about current drag drop state
     * @param canDrop - Indication whether can drop can occur on monitor itself
     */
    protected getDropCoordinates(monitor: DropTargetMonitor<LayoutDragItem, LayoutDropResult>, canDrop: boolean): [number | null, string | null];
    /**
     * Gets coordinates calculated for children of this component
     * @param monitor - Monitor containing information about current drag drop state
     */
    protected getDropCoordinatesForChildren(monitor: DropTargetMonitor<LayoutDragItem, LayoutDropResult>): [number | null, string | null];
    /**
     * Gets fixed drop coordinates
     * @param monitor - Monitor containing information about current drag drop state
     * @param canDrop - Indication whether can drop can occur on monitor itself
     */
    protected getFixedDropCoordinates(monitor: DropTargetMonitor<LayoutDragItem, LayoutDropResult>, canDrop: boolean): [number | null, string | null];
    /**
     * Gets index increment
     * @param monitor - Monitor to be used for obtaining information about index
     * @param horizontal - Indication whether are items horizontaly oriented
     */
    protected getIndexIncrement(monitor: DropTargetMonitor<LayoutDragItem, LayoutDropResult>): number;
    /**
     * Shows placeholder preview at specified location
     * @param preview - Instance of preview data
     */
    protected showPlaceholderPreview(preview: DropPlaceholderPreview): void;
    /**
     * Connects placeholder preview element to placeholder drop
     */
    protected connectDropToPlaceholder(): void;
    /**
     * Connects container element to container drop
     */
    protected connectDropToContainer(): void;
    /**
     * Gets indication whether any of ancestors can accept drop, also returns id of that ancestor
     * @param id - Id of component whose parent will be tested, if not specified id of this component will be used
     */
    protected canDropAncestors(id?: string, ancestorId?: string): [boolean, string | null, string];
    /**
     * Checks whether component has ancestor with specified identifier
     * @param component component to check
     * @param ancestorId ancestor identifier to find
     * @returns
     */
    protected hasAncestor(id: string, ancestorId?: string): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<DndCoreTreeItemDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<DndCoreTreeItemDirective, "[dndCoreTreeItem]", ["dndCoreTreeItem"], { "dropzoneElement": { "alias": "dropzoneElement"; "required": false; }; "containerElement": { "alias": "containerElement"; "required": false; }; "dragData": { "alias": "dndCoreTreeItem"; "required": false; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; }; }, { "dropMetadata": "dropMetadata"; }, never, never, false, never>;
}
//# sourceMappingURL=dndCoreTreeItem.directive.d.ts.map