import { JSONSchema6 } from 'json-schema';
import * as React from 'react';
import { ButtonProps } from '../../';
import { DefaultProps } from '../../common-types';
import { DropDownButtonProps } from '../DropDownButton';
declare class Filters extends React.Component<FiltersProps, FiltersState> {
    constructor(props: FiltersProps);
    componentWillReceiveProps(nextProps: FiltersProps): void;
    flattenViews(views: FiltersView[]): {
        filters: JSONSchema6[];
        id: string;
        name: string;
        scope?: string | null | undefined;
    }[];
    emitViewsUpdate(): void;
    getCleanEditModel(field?: string | null): {
        field: string;
        operator: string;
        value: any;
    };
    getOperators(field: string): {
        slug: string;
        label: any;
    }[];
    setEditField(field: string, index: number): void;
    setEditOperator(operator: string, index: number): void;
    setEditValue(value: string, index: number): void;
    emitFilterUpdate(): void;
    addFilter(): void;
    editFilter(filter: JSONSchema6): void;
    removeFilter({ $id, title }: JSONSchema6): void;
    setFilters(filters: JSONSchema6[]): void;
    addCompound(): void;
    removeCompound(index: number): void;
    saveView(name: string, scope: string | null): void;
    deleteView({ id }: FiltersView): void;
    setSimpleSearch(term: string): void;
    shouldRenderComponent(mode: FilterRenderMode): boolean;
    render(): JSX.Element;
}
export interface EditModel {
    field: string;
    operator: string;
    value: string | number | {
        [k: string]: string;
    };
}
export interface FilterInputProps {
    schema: JSONSchema6;
    value: any;
    operator: string;
    onUpdate: (value: any) => void;
}
export interface ViewScope {
    slug: string;
    name: string;
    label?: string;
}
export interface FiltersView {
    id: string;
    name: string;
    scope?: string | null;
    filters: JSONSchema6[];
}
export interface FilterSignature {
    field: string;
    operator: string;
    value: string | number | boolean | {
        [k: string]: string;
    };
}
export declare type FilterRenderMode = 'all' | 'add' | 'search' | 'views' | 'summary';
export interface DataTypeModel {
    operators: {
        [key: string]: {
            getLabel: (schema: JSONSchema6) => string;
        };
    };
    decodeFilter(filter: JSONSchema6): null | FilterSignature;
    createFilter(field: string, operator: string, value: any, schema: JSONSchema6): JSONSchema6;
    Edit(props: DataTypeEditProps): JSX.Element;
}
export interface DataTypeEditProps {
    schema: JSONSchema6;
    value?: any;
    onUpdate: (value: string | number | boolean) => void;
    operator: string;
    slim?: boolean;
}
export interface FiltersState {
    showModal: boolean;
    edit: EditModel[];
    editingFilter: string | null;
    searchString: string;
    filters: JSONSchema6[];
    views: FiltersView[];
    schema: JSONSchema6;
}
export interface FiltersProps extends DefaultProps {
    disabled?: boolean;
    filters?: JSONSchema6[];
    views?: FiltersView[];
    viewScopes?: ViewScope[];
    onFiltersUpdate?: (filters: JSONSchema6[]) => void;
    onViewsUpdate?: (views: FiltersView[]) => void;
    schema: JSONSchema6;
    addFilterButtonProps?: ButtonProps;
    viewsMenuButtonProps?: DropDownButtonProps;
    renderMode?: FilterRenderMode | FilterRenderMode[];
    dark?: boolean;
}
export default Filters;
