import { type ObservableOrValue } from '@dereekb/rxjs';
import { type LatLngPointInput, type LatLngBound, type LatLngBoundCheckFunction, type RoundNumberToStepFunctionInput, type LatLngPrecision, type Maybe } from '@dereekb/util';
import { type OperatorFunction } from 'rxjs';
import { type MapboxZoomLevel } from './mapbox';
import { type MapboxViewportBoundFunction } from './mapbox.util';
export type FilterMapboxBoundReadItemValueFunction<T> = (value: T) => MapboxViewportBoundFunctionItemValue;
export interface FilterMapboxBoundConfig<T> {
    readonly boundFunctionObs: ObservableOrValue<MapboxViewportBoundFunction>;
    readonly boundDecisionObs: ObservableOrValue<LatLngBoundCheckFunction>;
    /**
     * Reads the value from the input item.
     */
    readonly readValue: FilterMapboxBoundReadItemValueFunction<T>;
    /**
     * Minimum precision to retain. Defaults to LAT_LONG_10M_PRECISION
     */
    readonly precision?: LatLngPrecision;
    /**
     * Amount of zoom rounding to use. By default rounds to 0.5 steps using "floor" in order to "round up" since zoom values are inversely proportional to bounds area.
     */
    readonly zoomRounding?: RoundNumberToStepFunctionInput;
    /**
     * Default zoom level for item values that do not have an explicit zoom, or a zoom of 0.
     *
     * Defaults to 17, which can produce a viewport/bounds about the size of a park.
     */
    readonly defaultZoom?: MapboxZoomLevel;
}
export interface MapboxViewportBoundFunctionItemValue {
    readonly center: LatLngPointInput;
    readonly zoom?: Maybe<MapboxZoomLevel>;
}
export interface MapboxViewportBoundFunctionItem<T> {
    readonly value: T;
    readonly bound: LatLngBound;
}
/**
 * Filters the input objects based on their center and zoom values.
 *
 * This function caches the bounds computations for each of the input values.
 *
 * @param config
 * @returns
 */
export declare function filterByMapboxViewportBound<T>(config: FilterMapboxBoundConfig<T>): OperatorFunction<T[], T[]>;
