import { ChangeDetectorRef, OnInit, OnDestroy, QueryList } from '@angular/core';
import { LayoutComponentMetadata } from '@anglr/dynamic/layout';
import { Subscription } from 'rxjs';
import { DragActiveService, LayoutComponentsIteratorService, LayoutEditorMetadataManager } from '../../../services';
import { LayoutComponentDragData } from '../../../interfaces';
import * as i0 from "@angular/core";
/**
 * Component displaying components tree item
 */
export declare class ComponentsTreeItemSAComponent implements OnInit, OnDestroy {
    protected _manager: LayoutEditorMetadataManager;
    protected _changeDetector: ChangeDetectorRef;
    protected _draggingSvc: DragActiveService;
    protected iteratorSvc: LayoutComponentsIteratorService;
    /**
     * Subscriptions created during initialization
     */
    protected _initSubscriptions: Subscription;
    /**
     * Node children
     */
    protected children: LayoutComponentMetadata[];
    /**
     * Handles drag over events
     */
    protected dragOverSubscription?: Subscription | null;
    /**
     * Indicates whether layout component has children
     * @param node layout component to check
     * @returns
     */
    protected get hasChildren(): boolean;
    /**
     * Indication whether drag is disabled
     */
    protected get dragDisabled(): boolean;
    /**
     * Child tree node components
     */
    protected _childrenNodes: QueryList<ComponentsTreeItemSAComponent>;
    /**
     * Instance component tree item
     */
    data: LayoutComponentMetadata | undefined | null;
    /**
     * Tree item index
     */
    index: number;
    /**
     * Parent identifier
     */
    parentId: string | undefined | null;
    /**
     * Indication whether node is open
     */
    open: boolean;
    constructor(_manager: LayoutEditorMetadataManager, _changeDetector: ChangeDetectorRef, _draggingSvc: DragActiveService, iteratorSvc: LayoutComponentsIteratorService);
    /**
     * Initialize component
     */
    ngOnInit(): void;
    /**
     * Called when component is destroyed
     */
    ngOnDestroy(): void;
    /**
     * Toggle children visibility
     */
    toggle(): void;
    /**
     * Expands tree node
     * @param nodeId node identifier to expand
     * @returns indication whether node or its children were expanded
     */
    expand(nodeId?: string | undefined | null): boolean;
    /**
     * Adds descentant component metadata to this component metadata
     * @param dragData - Data from drag n drop event
     */
    addDescendant(dragData: LayoutComponentDragData): void;
    /**
     * Expands node and all its children
     */
    expandAll(): void;
    /**
     * Collapse tree node
     */
    collapse(): void;
    /**
     * Collapse node and all its children
     */
    collapseAll(): void;
    protected initChildren(): Promise<void>;
    /**
     * Highlights component
     * @param event - Mouse event that occured
     * @param id - Id of component that is highlighted
     */
    protected highlight(event: MouseEvent, id?: string): void;
    /**
     * Handle event when user is dragging over this components
     */
    protected _handleDragOver(): void;
    /**
     * Cancels highlight of component
     * @param event - Mouse event that occured
     */
    protected _cancelHighlight(event: MouseEvent): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsTreeItemSAComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ComponentsTreeItemSAComponent, "components-tree-item", ["componentsTreeItem"], { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "parentId": { "alias": "parentId"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, {}, never, never, true, never>;
}
//# sourceMappingURL=componentsTreeItem.component.d.ts.map