import { ChangeDetectorRef, OnInit, ViewContainerRef } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Dimension, DisplayBehaviour, EntityType, FilteringLogic, IAdvancedFilter, FilterOperator, IFilter, Property, Syntax, EntitySet, DataSettings } from '@metad/ocap-core';
import { NgmPropertySelectComponent, PropertyCapacity } from '@metad/ocap-angular/entity';
import { ISelectOption } from '@metad/ocap-angular/core';
import * as i0 from "@angular/core";
/**
 * @hidden
 */
declare class ExpressionItem {
    constructor(parent?: ExpressionGroupItem);
    parent: ExpressionGroupItem;
    selected: boolean;
}
/**
 * @hidden
 */
declare class ExpressionGroupItem extends ExpressionItem {
    constructor(operator: FilteringLogic, parent?: ExpressionGroupItem);
    operator: FilteringLogic;
    children: ExpressionItem[];
}
/**
 * @hidden
 */
declare class ExpressionOperandItem extends ExpressionItem {
    constructor(expression: IFilter, parent: ExpressionGroupItem);
    expression: IFilter;
    inEditMode: boolean;
    inAddMode: boolean;
    hovered: boolean;
    columnHeader: string;
}
export declare class NgmAdvancedFilterComponent implements OnInit {
    cdr: ChangeDetectorRef;
    dialog: MatDialog;
    private readonly _viewContainerRef;
    data?: {
        dataSettings: DataSettings;
        entityType: EntityType;
        syntax: Syntax;
        advancedFilter: IAdvancedFilter;
    };
    dialogRef?: MatDialogRef<NgmAdvancedFilterComponent>;
    isDialogContainer: boolean;
    PropertyCapacity: typeof PropertyCapacity;
    /**
     * @hidden @internal
     */
    DISPLAY_BEHAVIOUR: typeof DisplayBehaviour;
    FilterOperator: typeof FilterOperator;
    syntax: Syntax;
    entitySet: EntitySet;
    entityType: EntityType;
    resourceStrings: any;
    /**
     * @hidden @internal
     */
    rootGroup: ExpressionGroupItem;
    /**
     * @hidden @internal
     */
    selectedExpressions: ExpressionOperandItem[];
    /**
     * @hidden @internal
     */
    selectedGroups: ExpressionGroupItem[];
    /**
     * @hidden @internal
     */
    currentGroup: ExpressionGroupItem;
    /**
     * @hidden @internal
     */
    editedExpression: ExpressionOperandItem;
    /**
     * @hidden @internal
     */
    addModeExpression: ExpressionOperandItem;
    /**
     * @hidden @internal
     */
    contextualGroup: ExpressionGroupItem;
    /**
     * @hidden @internal
     */
    filteringLogics: any;
    operators: Array<ISelectOption>;
    /**
     * @hidden @internal
     */
    selectedCondition: FilterOperator;
    /**
     * @hidden @internal
     */
    searchValue: any;
    highValue: any;
    /**
     * @hidden @internal
     */
    columnSelect: NgmPropertySelectComponent;
    private _selectedDimension;
    private _clickTimer;
    private _dblClickDelay;
    private _preventChipClick;
    constructor(cdr: ChangeDetectorRef, dialog: MatDialog, _viewContainerRef: ViewContainerRef, data?: {
        dataSettings: DataSettings;
        entityType: EntityType;
        syntax: Syntax;
        advancedFilter: IAdvancedFilter;
    }, dialogRef?: MatDialogRef<NgmAdvancedFilterComponent>);
    ngOnInit(): void;
    /**
     * @hidden @internal
     */
    get selectedDimension(): Dimension;
    /**
     * @hidden @internal
     */
    set selectedDimension(value: Dimension);
    /**
     * @hidden @internal
     */
    get filterableColumns(): Property[];
    /**
     * @hidden @internal
     */
    getEntityProperty(name: any): Property;
    /**
     * @hidden @internal
     */
    addCondition(parent: ExpressionGroupItem, afterExpression?: ExpressionItem): void;
    /**
     * @hidden @internal
     */
    addAndGroup(parent?: ExpressionGroupItem, afterExpression?: ExpressionItem): void;
    /**
     * @hidden @internal
     */
    addOrGroup(parent?: ExpressionGroupItem, afterExpression?: ExpressionItem): void;
    /**
     * @hidden @internal
     */
    endGroup(groupItem: ExpressionGroupItem): void;
    /**
     * @hidden @internal
     */
    commitOperandEdit(): void;
    /**
     * @hidden @internal
     */
    cancelOperandAdd(): void;
    /**
     * @hidden @internal
     */
    cancelOperandEdit(): void;
    /**
     * @hidden @internal
     */
    operandCanBeCommitted(): boolean;
    /**
     * @hidden @internal
     */
    exitOperandEdit(): void;
    /**
     * @hidden @internal
     */
    isExpressionGroup(expression: ExpressionItem): boolean;
    private addGroup;
    /**
     * @hidden @internal
     */
    enterExpressionEdit(expressionItem: ExpressionOperandItem): void;
    getPropertyByName(path: any): Property;
    /**
     * @hidden @internal
     */
    clearSelection(): void;
    /**
     * @hidden @internal
     */
    enterExpressionAdd(expressionItem: ExpressionOperandItem): void;
    private onToggleExpression;
    private toggleExpression;
    private toggleContextMenu;
    private findSingleSelectedGroup;
    private isInsideGroup;
    private deleteItem;
    /**
     * @hidden @internal
     */
    onChipRemove(expressionItem: ExpressionItem): void;
    /**
     * @hidden @internal
     */
    onChipClick(expressionItem: ExpressionOperandItem): void;
    /**
     * @hidden @internal
     */
    onChipDblClick(expressionItem: ExpressionOperandItem): void;
    /**
     * @hidden @internal
     */
    getConditionFriendlyName(name: string): string;
    /**
     * @hidden @internal
     */
    getConditionList(): string[];
    /**
     * @hidden @internal
     */
    onGroupClick(groupItem: ExpressionGroupItem): void;
    private toggleGroup;
    private toggleGroupRecursive;
    private deselectParentRecursive;
    /**
     * @hidden @internal
     */
    invokeClick(eventArgs: KeyboardEvent): void;
    /**
     * @hidden @internal
     */
    context(expression: ExpressionItem, afterExpression?: ExpressionItem): {
        $implicit: ExpressionItem;
        afterExpression: ExpressionItem;
    };
    /**
       * @hidden @internal
       */
    onClearButtonClick(event?: Event): void;
    /**
     * @hidden @internal
     */
    onChipSelectionEnd(): void;
    getConditionByFilterOperator(operator: string): {
        iconName: string;
        isUnary: boolean;
    };
    openValueHelp(dimension: Dimension): Promise<any>;
    openLowValueHelp(dimension: Dimension): Promise<void>;
    openHighValueHelp(dimension: Dimension): Promise<void>;
    onApply(): void;
    /**
     * @hidden @internal
     */
    isDate(value: any): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgmAdvancedFilterComponent, [null, null, null, { optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgmAdvancedFilterComponent, "ngm-advanced-filter", never, { "syntax": { "alias": "syntax"; "required": false; }; "entitySet": { "alias": "entitySet"; "required": false; }; "entityType": { "alias": "entityType"; "required": false; }; "resourceStrings": { "alias": "resourceStrings"; "required": false; }; }, {}, never, never, false, never>;
}
export declare function getFilterConditionByProperty(dim: Dimension): string[];
export declare function convertExpressionItem2Filter(item: ExpressionItem): IFilter;
export declare function convertFilter2ExpressionItem(iFilter: IFilter, parent: ExpressionGroupItem): ExpressionItem;
export {};
