import type { Entity, EntityProperties } from "../Entity.js";
import type { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
import { ReadOnlyCollection } from "../utilities/ReadOnlyCollection.js";
import type { ChangeEvent } from "../utilities/collection.js";
import type { Feature, FeatureProperties } from "./Feature.js";
import type { FeatureSetProperties } from "./FeatureSet.js";
import { FeatureSet } from "./FeatureSet.js";
/**
 * Compares two features for the purposes of sorting.
 */
export type FeatureCompareFunction = (f1: Feature, f2: Feature) => number;
/**
 * Predicate used for filtering features.
 */
export type FeaturePredicate = (f: Feature) => boolean;
/**
 * The direction to sort in.
 */
export type SortDirection = 
/**
 * Sort from smallest to largest. For example, from A to Z.
 */
"asc"
/**
 * Sort from largest to smallest. For example, from Z to A.
 */
 | "desc";
/**
 * Defines a sort clause for an individual field.
 */
export interface SortClause {
    /**
     * The name of the field to sort by.
     */
    field: string;
    /**
     * The sort direction. The default is ascending.
     */
    direction?: SortDirection;
}
/**
 * Defines a filter clause for an individual field.
 */
export interface FilterClause {
    /**
     * The name of the field to filter by.
     */
    field: string;
    /**
     * The search text to match against.
     */
    match: string;
}
/**
 * Properties that can be passed into the constructor for
 * {@link data/FeatureList!FeatureList}.
 */
export interface FeatureListProperties extends EntityProperties {
    /**
     * The features contained in the list.
     */
    featureSet?: (Feature | FeatureProperties)[] | FeatureSetProperties | FeatureSet;
    /**
     * See {@link data/FeatureList!FeatureList.title}.
     */
    title?: string;
}
/**
 * A read-only view of a {@link data/FeatureSet!FeatureSet} that supports sorting
 * and filtering. This is a "live" view that is updated as the underlying
 * feature set changes.
 */
export declare class FeatureList extends ReadOnlyCollection<Feature> implements Entity, Serializable<FeatureListProperties> {
    /**
     * @inheritDoc
     */
    readonly id: string;
    /**
     * A human-readable name for the feature list.
     */
    title: string;
    /**
     * The backing set of features contained in this list.
     */
    readonly featureSet: FeatureSet;
    private _sortFunc;
    private _filterFunc;
    /**
     * @inheritDoc
     */
    get itemType(): string;
    constructor(featureSet: FeatureSet);
    constructor(properties?: FeatureListProperties);
    /**
     * @inheritDoc
     */
    toItemUri(): string;
    /**
     * Sets the properties for this list.
     *
     * @param properties An object containing property values to set.
     */
    assignProperties(properties: Partial<FeatureListProperties>): void;
    /**
     * @inheritDoc
     */
    assignPropertiesAsync(properties: Partial<FeatureListProperties>): Promise<void>;
    /**
     * @inheritDoc
     */
    finishAssignProperties(): Promise<void>;
    /**
     * Returns a serializable representation of this list.
     *
     * @param serializeMode If specified, only properties that are appropriate
     *   for the given mode are returned. Otherwise, all properties will be
     *   serialized.
     */
    toJSON(serializeMode?: SerializeMode): FeatureListProperties;
    /**
     * Gets the object's default property values.
     */
    getDefaults(): Partial<FeatureListProperties>;
    /**
     * Gets the default value of an object's property.
     *
     * @param key The property of the object for which to get the default value.
     */
    getDefault<K extends keyof FeatureListProperties>(key: K): FeatureListProperties[K];
    sort(criteria: string | SortClause | FeatureCompareFunction | (SortClause | string)[]): this;
    /**
     * Filters the list in place to only include items that match the given
     * criteria.
     *
     * @param criteria The filter criteria to apply.
     */
    applyFilter(criteria: string | FilterClause | FilterClause[] | FeaturePredicate): void;
    /**
     * Removes any filter that was applied via {@link applyFilter}.
     */
    removeFilter(): void;
    /**
     * Returns the serializable properties.
     *
     * @param serializeMode Optional. If specified, only properties that support
     *   the given serialization mode will be returned.
     */
    getSerializableProperties(serializeMode?: SerializeMode): PropertyDefs<FeatureSetProperties>;
    /**
     * @inheritDoc
     */
    protected _getSerializableProperties(): PropertyDefs<FeatureListProperties>;
    /**
     * Invoked whenever the underlying feature set has changed.
     *
     * @param event The change event.
     */
    protected _onFeatureSetChange(event: ChangeEvent<Feature, FeatureSet>): void;
    private _createSortFunc;
    private _stabilizeSortFunc;
    private _createFilterFunc;
    private _getSortValue;
    private _getFilterRegex;
    private _getField;
    private _inferFieldType;
    private _sort;
    private _insertionSort;
}
