import { DejaClipboardService, Destroy } from '@deja-js/component/core';
import { Position, Rect } from '@deja-js/component/core/graphics';
import { DragCursorInfos } from '@deja-js/component/v2/mouse-dragdrop';
import { BehaviorSubject, Subject } from 'rxjs';
import { DejaTile } from './tile.class';
import { IDejaTilesAddedEvent, IDejaTilesAddEvent, IDejaTilesDeletedEvent, IDejaTilesEvent, IDejaTilesRemoveEvent } from './tiles.event';
import { IDejaTilesRefreshParams } from './tiles-refresh-params.interface';
import * as i0 from "@angular/core";
export interface IDragSelection {
    startPosition: Position;
    selectedRect: Rect;
}
export interface IDragDropInfos {
    enabled: boolean;
    startX: number;
    startY: number;
    currentTile: DejaTile;
    tiles?: Array<DejaTile>;
}
export interface ITileDragDropContext {
    tile: DejaTile;
}
export declare class DejaTilesLayoutProvider extends Destroy {
    private clipboardService;
    refreshTiles$: Subject<IDejaTilesRefreshParams>;
    ensureVisible$: Subject<string>;
    ensureBounds$: Subject<Rect>;
    dragging$: BehaviorSubject<boolean>;
    dragSelection$: Subject<IDragSelection>;
    dragDropInfos$: Subject<IDragDropInfos>;
    selectionRect$: Subject<Rect>;
    dragover$: Subject<DragCursorInfos>;
    dragleave$: Subject<void>;
    deleteTiles$: Subject<DejaTile[]>;
    designMode: boolean;
    layoutCompleted: Subject<IDejaTilesEvent>;
    layoutChanged: Subject<IDejaTilesEvent>;
    tilesAdded: Subject<IDejaTilesAddedEvent>;
    tilesDeleted: Subject<IDejaTilesDeletedEvent>;
    selectionChanged: Subject<IDejaTilesEvent>;
    contentAdding: Subject<IDejaTilesAddEvent>;
    contentRemoving: Subject<IDejaTilesRemoveEvent>;
    protected _tileMinWidth: number;
    protected _tileMinWidthUnit: string;
    protected _tileMaxWidth: number;
    protected _tileMaxWidthUnit: string;
    protected _tileMinHeight: number;
    protected _tileMinHeightUnit: string;
    protected _tileMaxHeight: number;
    protected _tileMaxHeightUnit: string;
    protected _maxWidth: number;
    protected _maxWidthUnit: string;
    private tilesDic;
    private _tiles;
    private _cursor;
    private _targetBounds;
    private destination;
    private lastTargetBounds;
    private moveTimOut;
    private originalLayout;
    private validLayout;
    private dragPageOffset;
    private dragOriginalPosition;
    private dragRelativePosition;
    private _container;
    private currentTile;
    private hundredPercentWith;
    private dragTarget;
    private selectedIds;
    constructor(clipboardService: DejaClipboardService);
    set container(container: HTMLElement);
    get container(): HTMLElement;
    set tiles(tiles: Array<DejaTile>);
    get tiles(): DejaTile[];
    set selectedTiles(selectedIds: Array<string>);
    set tileMinWidth(value: string);
    set tileMaxWidth(value: string);
    set tileMinHeight(value: string);
    set tileMaxHeight(value: string);
    set maxWidth(value: string);
    private get targetBounds();
    private set targetBounds(value);
    copySelection(): DejaTile[];
    cutSelection(): DejaTile[];
    deleteSelection(): DejaTile[];
    paste(): DejaTile[];
    getTileElementFromHTMLElement(element: HTMLElement): HTMLElement;
    isElementInsideDejaEditor(element: HTMLElement): boolean;
    getTileComponentFromHTMLElement(element: HTMLElement): DejaTile;
    deleteTiles(tilesToDelete: Array<DejaTile>): void;
    removeTiles(tileIdsToRemove: Array<string>): void;
    getFreePlace(idealBounds: Rect): Rect;
    moveTile(id: string, bounds: Rect): void;
    hitTest(pixelBounds: Rect): DejaTile[];
    getPercentSize(value: number): number;
    dragEnter(dragContext: ITileDragDropContext, dragCursor: DragCursorInfos): boolean;
    startDrag(tiles: Array<DejaTile>, pageX: number, pageY: number): void;
    cancelDrag(tiles: Array<DejaTile>): void;
    drop(tiles: Array<DejaTile>): DejaTile[];
    endDrag(): void;
    drag(tiles: Array<DejaTile>, pageX: number, pageY: number): void;
    addTiles(newTiles: Array<DejaTile>): void;
    private size;
    private clearMoveTimer;
    private move;
    private ensureContainer;
    private ensureTarget;
    private saveLayout;
    private getPixelBounds;
    private getPixelSize;
    private getSizePercentLimit;
    private getSizePixelLimit;
    private getTileMinPixelSize;
    private getTileMaxPixelSize;
    private getTileMinPercentWidth;
    private getTileMaxPercentWidth;
    private getTileMinPercentHeight;
    private getTileMaxPercentHeight;
    private getMaxPercentWidth;
    private getMaxPercentHeight;
    private getCursorFromHtmlElement;
    private extractValueAndUnit;
    private restoreLayout;
    private calcHorizontalOverflow;
    private moveHorizontal;
    private pushHorizontal;
    private calcVerticalOverflow;
    private moveVertical;
    private pushVertical;
    private copyTiles;
    private removeTemporaryTile;
    static ɵfac: i0.ɵɵFactoryDeclaration<DejaTilesLayoutProvider, [{ optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<DejaTilesLayoutProvider>;
}
