import { AdditionalFilter, Field } from '../AdditionalFilter/types';
import { SelectedDrilldown } from '../Drilldown/Drilldown';
import { FeatureToggles } from '../FeatureToggle/types';
import { VariableList } from '../Variables/types';
import { AliasFields } from '../AliasFields/types';
import { SaveableDashboardDefinition } from '../Dashboard';
declare type UpdateFilterType = {
    properties: Partial<Omit<AdditionalFilter, 'appliesToFields'>> & {
        appliesToFields: Array<Field>;
    };
};
export declare type StateOptions = {
    addFilter?: {
        properties: AdditionalFilter;
    };
    updateFilter?: UpdateFilterType;
    updateFilters?: UpdateFilterType[];
    removeFilter?: Array<Field>;
    featureToggles?: Partial<FeatureToggles>;
    variables?: VariableList;
    aliasFields?: AliasFields;
};
export declare type Resizing = {
    timeout?: number;
} | boolean;
export declare type Drilldown = SelectedDrilldown & {
    viewId: string;
};
export declare type SubscriberOptions = StateOptions & {
    reload?: boolean;
    save?: boolean;
    resizing?: Resizing;
    variables?: VariableList;
    drilldown?: Drilldown;
    clearInMemoryDb?: boolean;
    dashboard?: Partial<Pick<SaveableDashboardDefinition, 'display' | 'customFields'>>;
};
export declare type Subscriber = (data: SubscriberOptions) => void;
export declare enum SavingState {
    InProgress = "InProgress",
    Saved = "Saved",
    Undefined = "Undefined"
}
interface VizzlyState {
    get: (identifier: string, listener: Subscriber) => () => void;
    set: (identifier: string, data: StateOptions) => void;
    reload: (identifier: string) => void;
    inBrowserRefetchData: (identifier: string) => void;
    save: (identifier: string) => void;
    resizing: (identifier: string, resizing: boolean) => void;
    drilldown: (identifier: string, params?: Drilldown) => void;
    setDashboard: (identifier: string, dashboard: SubscriberOptions['dashboard']) => void;
}
export declare class VizzlyStateManager implements VizzlyState {
    private subscribers;
    get(channel: string, listener: Subscriber): () => void;
    set(channel: string, data: StateOptions): void;
    reload(identifier: string): void;
    inBrowserRefetchData(identifier: string): void;
    save(identifier: string): void;
    resizing(identifier: string, resizing: boolean, params?: {
        timeout?: number;
    }): void;
    drilldown(identifier: string, params?: Drilldown): void;
    setDashboard(identifier: string, dashboard: SubscriberOptions['dashboard']): void;
}
/**
 * @deprecated use `VizzlyState`
 */
export declare const vizzlyState: VizzlyStateManager;
export declare const VizzlyState: VizzlyStateManager;
export {};
