// Generated by typings
// Source: node_modules/angular2-grid/directives/NgGrid.d.ts
declare module '~angular2-grid/directives/NgGrid' {
import { ElementRef, Renderer, EventEmitter, ComponentFactoryResolver, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef } from '@angular/core';
import { NgGridConfig, NgGridItemEvent, NgGridItemPosition, NgGridItemSize } from '~angular2-grid/interfaces/INgGrid';
import { NgGridItem } from '~angular2-grid/directives/NgGridItem';
export class NgGrid implements OnInit, DoCheck, OnDestroy {
    private _differs;
    private _ngEl;
    private _renderer;
    private componentFactoryResolver;
    private _containerRef;
    onDragStart: EventEmitter<NgGridItem>;
    onDrag: EventEmitter<NgGridItem>;
    onDragStop: EventEmitter<NgGridItem>;
    onResizeStart: EventEmitter<NgGridItem>;
    onResize: EventEmitter<NgGridItem>;
    onResizeStop: EventEmitter<NgGridItem>;
    onItemChange: EventEmitter<Array<NgGridItemEvent>>;
    colWidth: number;
    rowHeight: number;
    minCols: number;
    minRows: number;
    marginTop: number;
    marginRight: number;
    marginBottom: number;
    marginLeft: number;
    isDragging: boolean;
    isResizing: boolean;
    autoStyle: boolean;
    resizeEnable: boolean;
    dragEnable: boolean;
    cascade: string;
    minWidth: number;
    minHeight: number;
    private _items;
    private _draggingItem;
    private _resizingItem;
    private _resizeDirection;
    private _itemGrid;
    private _containerWidth;
    private _containerHeight;
    private _maxCols;
    private _maxRows;
    private _visibleCols;
    private _visibleRows;
    private _setWidth;
    private _setHeight;
    private _posOffset;
    private _adding;
    private _placeholderRef;
    private _fixToGrid;
    private _autoResize;
    private _differ;
    private _destroyed;
    private _maintainRatio;
    private _aspectRatio;
    private _preferNew;
    private _zoomOnDrag;
    private _limitToScreen;
    private _curMaxRow;
    private _curMaxCol;
    private _dragReady;
    private _resizeReady;
    private static CONST_DEFAULT_CONFIG;
    private _config;
    config: NgGridConfig;
    constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer, componentFactoryResolver: ComponentFactoryResolver, _containerRef: ViewContainerRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    setConfig(config: NgGridConfig): void;
    getItemPosition(index: number): NgGridItemPosition;
    getItemSize(index: number): NgGridItemSize;
    ngDoCheck(): boolean;
    setMargins(margins: Array<string>): void;
    enableDrag(): void;
    disableDrag(): void;
    enableResize(): void;
    disableResize(): void;
    addItem(ngItem: NgGridItem): void;
    removeItem(ngItem: NgGridItem): void;
    updateItem(ngItem: NgGridItem): void;
    triggerCascade(): void;
    triggerResize(): void;
    resizeEventHandler(e: any): void;
    mouseDownEventHandler(e: MouseEvent): void;
    mouseUpEventHandler(e: any): void;
    mouseMoveEventHandler(e: any): void;
    private updatePositionsAfterMaxChange();
    private _calculateColWidth();
    private _calculateRowHeight();
    private _updateRatio();
    private _applyChanges(changes);
    private _resizeStart(e);
    private _dragStart(e);
    private _zoomOut();
    private _resetZoom();
    private _drag(e);
    private _resize(e);
    private _dragStop(e);
    private _resizeStop(e);
    private _maxGridSize(w, h);
    private _calculateGridSize(width, height);
    private _calculateGridPosition(left, top);
    private _hasGridCollision(pos, dims);
    private _getCollisions(pos, dims);
    private _fixGridCollisions(pos, dims);
    private _cascadeGrid(pos?, dims?);
    private _fixGridPosition(pos, dims);
    private _isWithinBoundsX(pos, dims);
    private _fixPosToBoundsX(pos, dims);
    private _fixSizeToBoundsX(pos, dims);
    private _isWithinBoundsY(pos, dims);
    private _fixPosToBoundsY(pos, dims);
    private _fixSizeToBoundsY(pos, dims);
    private _isWithinBounds(pos, dims);
    private _fixPosToBounds(pos, dims);
    private _fixSizeToBounds(pos, dims);
    private _addToGrid(item);
    private _removeFromGrid(item);
    private _filterGrid();
    private _updateSize();
    private _getMaxRow();
    private _getMaxCol();
    private _getMousePosition(e);
    private _getAbsoluteMousePosition(e);
    private _getContainerColumns();
    private _getContainerRows();
    private _getItemFromPosition(position);
    private _createPlaceholder(item);
    private _emitOnItemChange();
}
}
declare module 'angular2-grid/directives/NgGrid' {
export * from '~angular2-grid/directives/NgGrid';
}

// Generated by typings
// Source: node_modules/angular2-grid/directives/NgGridItem.d.ts
declare module '~angular2-grid/directives/NgGridItem' {
import { NgGrid } from '~angular2-grid/directives/NgGrid';
import { NgGridItemConfig, NgGridItemEvent, NgGridItemPosition, NgGridItemSize, NgGridRawPosition, NgGridItemDimensions } from '~angular2-grid/interfaces/INgGrid';
import { ElementRef, Renderer, EventEmitter, KeyValueDiffers, OnInit, OnDestroy, ViewContainerRef } from '@angular/core';
export class NgGridItem implements OnInit, OnDestroy {
    private _differs;
    private _ngEl;
    private _renderer;
    private _ngGrid;
    containerRef: ViewContainerRef;
    onItemChange: EventEmitter<NgGridItemEvent>;
    onDragStart: EventEmitter<NgGridItemEvent>;
    onDrag: EventEmitter<NgGridItemEvent>;
    onDragStop: EventEmitter<NgGridItemEvent>;
    onDragAny: EventEmitter<NgGridItemEvent>;
    onResizeStart: EventEmitter<NgGridItemEvent>;
    onResize: EventEmitter<NgGridItemEvent>;
    onResizeStop: EventEmitter<NgGridItemEvent>;
    onResizeAny: EventEmitter<NgGridItemEvent>;
    onChangeStart: EventEmitter<NgGridItemEvent>;
    onChange: EventEmitter<NgGridItemEvent>;
    onChangeStop: EventEmitter<NgGridItemEvent>;
    onChangeAny: EventEmitter<NgGridItemEvent>;
    ngGridItemChange: EventEmitter<NgGridItemConfig>;
    private static CONST_DEFAULT_CONFIG;
    isFixed: boolean;
    isDraggable: boolean;
    isResizable: boolean;
    minWidth: number;
    minHeight: number;
    private _payload;
    private _currentPosition;
    private _size;
    private _config;
    private _dragHandle;
    private _resizeHandle;
    private _borderSize;
    private _elemWidth;
    private _elemHeight;
    private _elemLeft;
    private _elemTop;
    private _added;
    private _differ;
    private _cascadeMode;
    private _maxCols;
    private _minCols;
    private _maxRows;
    private _minRows;
    config: NgGridItemConfig;
    readonly sizex: number;
    readonly sizey: number;
    readonly col: number;
    readonly row: number;
    readonly currentCol: number;
    readonly currentRow: number;
    constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer, _ngGrid: NgGrid, containerRef: ViewContainerRef);
    onResizeStartEvent(): void;
    onResizeEvent(): void;
    onResizeStopEvent(): void;
    onDragStartEvent(): void;
    onDragEvent(): void;
    onDragStopEvent(): void;
    onCascadeEvent(): void;
    ngOnInit(): void;
    canDrag(e: any): boolean;
    findHandle(handleSelector: string, startElement: HTMLElement): boolean;
    canResize(e: any): string;
    onMouseMove(e: any): void;
    ngOnDestroy(): void;
    getElement(): ElementRef;
    getDragHandle(): string;
    getResizeHandle(): string;
    getDimensions(): NgGridItemDimensions;
    getSize(): NgGridItemSize;
    getPosition(): NgGridRawPosition;
    getGridPosition(): NgGridItemPosition;
    setConfig(config: NgGridItemConfig): void;
    ngDoCheck(): boolean;
    setSize(newSize: NgGridItemSize, update?: boolean): void;
    setGridPosition(gridPosition: NgGridItemPosition, update?: boolean): void;
    getEventOutput(): NgGridItemEvent;
    setPosition(x: number, y: number): void;
    setCascadeMode(cascade: string): void;
    setDimensions(w: number, h: number): void;
    startMoving(): void;
    stopMoving(): void;
    recalculateSelf(): void;
    fixResize(newSize: NgGridItemSize): NgGridItemSize;
    private elementMatches(element, selector);
    private _recalculatePosition();
    private _recalculateDimensions();
    private _getMousePosition(e);
    private _applyChanges(changes);
}
}
declare module 'angular2-grid/directives/NgGridItem' {
export * from '~angular2-grid/directives/NgGridItem';
}

// Generated by typings
// Source: node_modules/angular2-grid/components/NgGridPlaceholder.d.ts
declare module '~angular2-grid/components/NgGridPlaceholder' {
import { NgGrid } from '~angular2-grid/directives/NgGrid';
import { NgGridItemPosition, NgGridItemSize } from '~angular2-grid/interfaces/INgGrid';
import { ElementRef, Renderer, OnInit } from '@angular/core';
export class NgGridPlaceholder implements OnInit {
    private _ngEl;
    private _renderer;
    private _size;
    private _position;
    private _ngGrid;
    private _cascadeMode;
    constructor(_ngEl: ElementRef, _renderer: Renderer);
    registerGrid(ngGrid: NgGrid): void;
    ngOnInit(): void;
    setSize(newSize: NgGridItemSize): void;
    setGridPosition(newPosition: NgGridItemPosition): void;
    setCascadeMode(cascade: string): void;
    private _setDimensions(w, h);
    private _setPosition(x, y);
    private _recalculatePosition();
    private _recalculateDimensions();
}
}
declare module 'angular2-grid/components/NgGridPlaceholder' {
export * from '~angular2-grid/components/NgGridPlaceholder';
}

// Generated by typings
// Source: node_modules/angular2-grid/interfaces/INgGrid.d.ts
declare module '~angular2-grid/interfaces/INgGrid' {
export interface NgGridConfig {
    margins?: number[];
    draggable?: boolean;
    resizable?: boolean;
    max_cols?: number;
    max_rows?: number;
    visible_cols?: number;
    visible_rows?: number;
    min_cols?: number;
    min_rows?: number;
    col_width?: number;
    row_height?: number;
    cascade?: string;
    min_width?: number;
    min_height?: number;
    fix_to_grid?: boolean;
    auto_style?: boolean;
    auto_resize?: boolean;
    maintain_ratio?: boolean;
    prefer_new?: boolean;
    zoom_on_drag?: boolean;
    limit_to_screen?: boolean;
}
export interface NgGridItemConfig {
    payload?: any;
    col?: number;
    row?: number;
    sizex?: number;
    sizey?: number;
    dragHandle?: string;
    resizeHandle?: string;
    fixed?: boolean;
    draggable?: boolean;
    resizable?: boolean;
    borderSize?: number;
    maxCols?: number;
    minCols?: number;
    maxRows?: number;
    minRows?: number;
    minWidth?: number;
    minHeight?: number;
}
export interface NgGridItemEvent {
    payload: any;
    col: number;
    row: number;
    sizex: number;
    sizey: number;
    width: number;
    height: number;
    left: number;
    top: number;
}
export interface NgGridItemSize {
    x: number;
    y: number;
}
export interface NgGridItemPosition {
    col: number;
    row: number;
}
export interface NgGridRawPosition {
    left: number;
    top: number;
}
export interface NgGridItemDimensions {
    width: number;
    height: number;
}
}
declare module 'angular2-grid/interfaces/INgGrid' {
export * from '~angular2-grid/interfaces/INgGrid';
}

// Generated by typings
// Source: node_modules/angular2-grid/modules/NgGrid.module.d.ts
declare module '~angular2-grid/modules/NgGrid.module' {
export class NgGridModule {
}
}
declare module 'angular2-grid/modules/NgGrid.module' {
export * from '~angular2-grid/modules/NgGrid.module';
}

// Generated by typings
// Source: node_modules/angular2-grid/main.d.ts
declare module '~angular2-grid/main' {
export * from '~angular2-grid/directives/NgGrid';
export * from '~angular2-grid/directives/NgGridItem';
export * from '~angular2-grid/components/NgGridPlaceholder';
export * from '~angular2-grid/interfaces/INgGrid';
export * from '~angular2-grid/modules/NgGrid.module';
}
declare module 'angular2-grid/main' {
export * from '~angular2-grid/main';
}
declare module 'angular2-grid' {
export * from '~angular2-grid/main';
}
