import { ChangeValueOptions, Filter, FilterEvents, FilterItem, FilterStateBaseParams, FilterOperator } from '../../model';
/**
 * Check if an operator requires a value input.
 * Operators that don't need a value (IS_EMPTY, EXISTS, NOT_EXISTS) are
 * immediately "active" when selected, so they have no neutral "zero state".
 */
export declare const operatorNeedsValue: (operator: FilterOperator) => boolean;
/**
 * Standard operator ordering for UI display.
 * This is the default ordering applied when `operatorOrderOverride` is not set.
 */
export declare const DEFAULT_OPERATOR_ORDER: FilterOperator[];
export interface OperatorFilterValue<T> {
    operator: FilterOperator;
    value: T | null;
}
export interface OperatorFilterStateParams<T> extends Omit<FilterStateBaseParams<OperatorFilterValue<T>>, 'itemKey' | 'itemName' | 'equals'> {
    /**
     * Function to get the key of an item (for value dropdown)
     */
    itemKey?: (item: FilterItem<OperatorFilterValue<T>>) => string;
    /**
     * Function to get the display name of an item (for value dropdown)
     */
    itemName?: (item: FilterItem<OperatorFilterValue<T>>) => string;
    /**
     * Function to check if two items are equal
     */
    equals?: (item1: FilterItem<OperatorFilterValue<T>>, item2: FilterItem<OperatorFilterValue<T>>) => boolean;
    /**
     * Function to encode the value for serialization
     */
    encode?: (value: OperatorFilterValue<T>) => unknown;
    /**
     * Function to decode a value from serialization
     */
    decode?: (value: unknown) => OperatorFilterValue<T>;
    /**
     * Function to check if an item matches the filter value
     */
    matches?: (item: FilterItem<OperatorFilterValue<T>>, value: OperatorFilterValue<T>) => boolean;
    /**
     * List of allowed operators for this filter.
     * The first operator will be used as the default.
     */
    allowedOperators: FilterOperator[];
    /**
     * When `true`, keeps `allowedOperators` order as-is instead of
     * reordering by `DEFAULT_OPERATOR_ORDER`. If the first operator
     * doesn't require a value, falls back to default order.
     */
    operatorOrderOverride?: boolean;
}
export declare class OperatorFilterState<T = string> implements Filter<OperatorFilterValue<T>> {
    name: string;
    persistent: boolean | undefined;
    _value: OperatorFilterValue<T> | undefined;
    readonly allowedOperators: FilterOperator[];
    readonly operatorOrderOverride: boolean;
    readonly itemKey: (item: FilterItem<OperatorFilterValue<T>>) => string;
    readonly itemName: (item: FilterItem<OperatorFilterValue<T>>) => string;
    readonly equals: (item1: FilterItem<OperatorFilterValue<T>>, item2: FilterItem<OperatorFilterValue<T>>) => boolean;
    readonly matches: (item: FilterItem<OperatorFilterValue<T>>, value: OperatorFilterValue<T>) => boolean;
    readonly decode: (value: unknown) => OperatorFilterValue<T>;
    readonly encode: (value: OperatorFilterValue<T>) => unknown;
    readonly events: FilterEvents;
    constructor(params: Readonly<OperatorFilterStateParams<T>>);
    get value(): OperatorFilterValue<T>;
    get toArray(): OperatorFilterValue<T>[];
    get _toArray(): (value: OperatorFilterValue<T>) => OperatorFilterValue<T>[];
    get isEmpty(): boolean;
    /** Computed default operator - first in allowedOperators */
    get defaultOperator(): FilterOperator;
    get size(): 0 | 1;
    setValue(value: OperatorFilterValue<T>, { emitEvents, ...options }?: ChangeValueOptions): void;
    changeValue(value: OperatorFilterValue<T>, { emitEvents, ...options }?: ChangeValueOptions): void;
    refresh(value: OperatorFilterValue<T>, options?: ChangeValueOptions): void;
    scheduleRefresh(value: OperatorFilterValue<T>): void;
    /**
     * Set only the operator, keeping the current value
     */
    setOperator(operator: FilterOperator, options?: ChangeValueOptions): void;
    /**
     * Set only the filter value, keeping the current operator
     */
    setFilterValue(value: T | null, options?: ChangeValueOptions): void;
    get toQueryString(): string;
    applyFromQueryString(str: string): void;
    reset(options?: ChangeValueOptions): void;
    remove(_items: FilterItem<OperatorFilterValue<T>>[], options?: ChangeValueOptions): void;
    hasDiff(data: OperatorFilterValue<T>): boolean;
    clone(params?: Partial<OperatorFilterStateParams<T>>): OperatorFilterState<T>;
}
export declare const operatorFilter: <T>(params: OperatorFilterStateParams<T>) => OperatorFilterState<T>;
export declare const stringOperatorFilter: (params: Omit<Partial<OperatorFilterStateParams<string>>, 'allowedOperators'> & {
    allowedOperators: FilterOperator[];
}) => OperatorFilterState<string>;
//# sourceMappingURL=OperatorFilterState.d.ts.map