import type { FilterFieldProps } from '../../FilterField.types.js'; import type { FilterFieldRemoveStatement, FilterFieldValueOperationResult } from '../../types/value-operations.js'; /** * Removes a filter statement or value from an existing FilterField value string. * * - If the value is not present for the specified key, the statement is not changed. * - If removing a value from `key in (v1, v2)` leaves one value, the statement collapses to `key = v1`. * - When multiple statements with the same key, operator and value exist, the rightmost one (in document order) is removed. * - When `options.removeAll` is `true`, all matching occurrences are removed instead of only the rightmost one. * - Passing a key-only statement (`{ key }`, without `value` or `comparisonOperator`) matches every * statement for that key regardless of operator or value — combine with `removeAll` to clear the key. * * @public * @param currentValue - The current FilterField value string. * @param filter - The filter statement or value to remove. Pass `valueType` on the filter to match * against values added with the same type hint — e.g. `valueType: 'String'` removes * only a `String` leaf, not a Boolean leaf of the same value. For the flag-gated * types (`'IPAddress'`, `'Timestamp'`, `'UID'`, `'SmartscapeId'`) pass the matching * `options.parserConfig` flag as well, otherwise the value resolves to a `String`. * @param options - Optional configuration for the remove operation. `parserConfig` controls how * `currentValue` is parsed and how `valueType` is resolved; pass the same config * used for the corresponding `addFilter` call so removal stays symmetric. * @returns The new FilterField value string and whether the operation produced a change. */ export declare function removeFilter(currentValue: string, filter: FilterFieldRemoveStatement, options?: { removeAll?: boolean; /** Parser config to apply when interpreting the existing value and resolving `valueType`. */ parserConfig?: FilterFieldProps['parserConfig']; }): FilterFieldValueOperationResult; //# sourceMappingURL=remove-filter.d.ts.map