import { ComponentFactoryResolver, ViewContainerRef } from '@angular/core';
import { IFilteringExpressionsTree } from '../data-operations/filtering-expressions-tree';
import { IPagingState } from '../data-operations/paging-state.interface';
import { GridColumnDataType } from '../data-operations/data-util';
import { IGroupingState } from '../data-operations/groupby-state.interface';
import { IPinningConfig } from './grid.common';
import { GridSelectionRange } from './common/types';
import { ISortingExpression } from '../data-operations/sorting-strategy';
import { GridType } from './common/grid.interface';
import * as i0 from "@angular/core";
export interface IGridState {
    columns?: IColumnState[];
    filtering?: IFilteringExpressionsTree;
    advancedFiltering?: IFilteringExpressionsTree;
    paging?: IPagingState;
    sorting?: ISortingExpression[];
    groupBy?: IGroupingState;
    cellSelection?: GridSelectionRange[];
    rowSelection?: any[];
    columnSelection?: string[];
    rowPinning?: any[];
    pinningConfig?: IPinningConfig;
    expansion?: any[];
    rowIslands?: IGridStateCollection[];
    id?: string;
}
export interface IGridStateCollection {
    id: string;
    parentRowID: any;
    state: IGridState;
}
export interface IGridStateOptions {
    columns?: boolean;
    filtering?: boolean;
    advancedFiltering?: boolean;
    sorting?: boolean;
    groupBy?: boolean;
    paging?: boolean;
    cellSelection?: boolean;
    rowSelection?: boolean;
    columnSelection?: boolean;
    rowPinning?: boolean;
    pinningConfig?: boolean;
    expansion?: boolean;
    rowIslands?: boolean;
}
export interface IColumnState {
    pinned: boolean;
    sortable: boolean;
    filterable: boolean;
    editable: boolean;
    sortingIgnoreCase: boolean;
    filteringIgnoreCase: boolean;
    headerClasses: string;
    headerGroupClasses: string;
    maxWidth: string;
    groupable: boolean;
    movable: boolean;
    hidden: boolean;
    dataType: GridColumnDataType;
    hasSummary: boolean;
    field: string;
    width: any;
    header: string;
    resizable: boolean;
    searchable: boolean;
    columnGroup: boolean;
    parent: any;
    disableHiding: boolean;
}
export declare type GridFeatures = keyof IGridStateOptions;
export declare class IgxGridStateDirective {
    grid: GridType;
    private resolver;
    private viewRef;
    private static ngAcceptInputType_options;
    private featureKeys;
    private state;
    private currGrid;
    private _options;
    private FEATURES;
    /**
     *  An object with options determining if a certain feature state should be saved.
     * ```html
     * <igx-grid [igxGridState]="options"></igx-grid>
     * ```
     * ```typescript
     * public options = {selection: false, advancedFiltering: false};
     * ```
     */
    get options(): IGridStateOptions;
    set options(value: IGridStateOptions);
    /**
     * @hidden
     */
    constructor(grid: GridType, resolver: ComponentFactoryResolver, viewRef: ViewContainerRef);
    /**
     * Gets the state of a feature or states of all grid features, unless a certain feature is disabled through the `options` property.
     *
     * @param `serialize` determines whether the returned object will be serialized to JSON string. Default value is true.
     * @param `feature` string or array of strings determining the features to be added in the state. If skipped, all features are added.
     * @returns Returns the serialized to JSON string IGridState object, or the non-serialized IGridState object.
     * ```html
     * <igx-grid [igxGridState]="options"></igx-grid>
     * ```
     * ```typescript
     * @ViewChild(IgxGridStateDirective, { static: true }) public state;
     * let state = this.state.getState(); // returns string
     * let state = this.state(false) // returns `IGridState` object
     * ```
     */
    getState(serialize?: boolean, features?: GridFeatures | GridFeatures[]): IGridState | string;
    /**
     * Restores grid features' state based on the IGridState object passed as an argument.
     *
     * @param IGridState object to restore state from.
     * @returns
     * ```html
     * <igx-grid [igxGridState]="options"></igx-grid>
     * ```
     * ```typescript
     * @ViewChild(IgxGridStateDirective, { static: true }) public state;
     * this.state.setState(gridState);
     * ```
     */
    setState(state: IGridState | string, features?: GridFeatures | GridFeatures[]): void;
    /**
     * Builds an IGridState object.
     */
    private buildState;
    /**
     * The method that calls corresponding methods to restore features from the passed IGridState object.
     */
    private restoreGridState;
    private restoreFeatures;
    /**
     * Returns a collection of all grid features.
     */
    private applyFeatures;
    /**
     * This method builds a FilteringExpressionsTree from a provided object.
     */
    private createExpressionsTreeFromObject;
    /**
     * Returns the filtering logic function for a given dataType and condition (contains, greaterThan, etc.)
     */
    private generateFilteringCondition;
    private stringifyCallback;
    private getFeature;
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxGridStateDirective, [{ optional: true; host: true; }, null, null]>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<IgxGridStateDirective, "[igxGridState]", never, { "options": "igxGridState"; }, {}, never>;
}
/**
 * @hidden
 */
export declare class IgxGridStateModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<IgxGridStateModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<IgxGridStateModule, [typeof IgxGridStateDirective], never, [typeof IgxGridStateDirective]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<IgxGridStateModule>;
}
