import { Evented } from "@arcgis/core/core/Evented.js";
import type { Entity, EntityProperties } from "../Entity.js";
import type { PropertyDefs, Serializable, SerializeMode } from "../support/Serializable.js";
import type { ChangeEvent } from "../support/esri.js";
import type { FeatureProperties } from "./Feature.js";
import { Feature } from "./Feature.js";
import type { FeatureSettingsProperties } from "./FeatureSettings.js";
import { FeatureSettings } from "./FeatureSettings.js";
import type { FeatureSource } from "./FeatureSource.js";
import type { SchemaProperties } from "./Schema.js";
import { Schema } from "./Schema.js";
/**
 * Events emitted by the {@link data/FeatureSet!FeatureSet} class.
 */
export interface FeatureSetEvents {
    /**
     * Emitted when one or more dehydrated features are added to the set. This
     * can occur when deserializing a feature set from a project, or when
     * features with a source are added to the set without geometry.
     */
    "dehydrated-features-added": Feature[];
    /**
     * Emitted after one or more dehydrated features have been hydrated.
     */
    "feature-hydration-complete": Feature[];
    /**
     * Emitted when the features in the set have changed. The event contains
     * arrays of added, removed, and moved features, as well as a reference to
     * the set itself.
     */
    change: ChangeEvent<Feature, FeatureSet>;
}
/**
 * Properties that can be passed into the constructor for
 * {@link data/FeatureSet!FeatureSet}.
 */
export interface FeatureSetProperties extends EntityProperties {
    /**
     * The features contained in the set.
     */
    features?: (Feature | FeatureProperties)[];
    /**
     * A human-readable name for the feature set.
     */
    title?: string;
    /**
     * The source for the features.
     */
    source?: FeatureSource;
    /**
     * Metadata about features such as fields, domains, and geometry type.
     */
    schema?: SchemaProperties;
    /**
     * Default settings that apply to features in this set.
     */
    settings?: FeatureSettingsProperties;
}
declare const FeatureSet_base: typeof Evented & (abstract new (...args: any[]) => import("../support/observableUtils.js").ObservableMixin);
/**
 * A set of features that share a common schema.
 */
export declare class FeatureSet extends FeatureSet_base implements Entity, Serializable<FeatureSetProperties>, Set<Feature> {
    /**
     * @deprecated Do not directly reference this property. Use EventNames and
     *   EventTypes helpers from @arcgis/core/Evented.
     */
    "@eventTypes": FeatureSetEvents;
    /**
     * Used by Object.toString().
     */
    readonly [Symbol.toStringTag]: "Set";
    /**
     * @inheritDoc
     */
    readonly id: string;
    /**
     * A human-readable name for the feature set.
     */
    title: string;
    /**
     * The number of elements in the set.
     */
    get size(): number;
    /**
     * The source for the features.
     */
    get source(): FeatureSource;
    set source(value: FeatureSource);
    /**
     * Default settings that apply to features in this set.
     */
    readonly settings: FeatureSettings;
    /**
     * Metadata about features such as fields, domains, and geometry type.
     */
    readonly schema: Schema;
    /**
     * @inheritDoc
     */
    get itemType(): string;
    private _source;
    private _rehydratingFeatureCount;
    private readonly _rehydratingFeatures;
    private readonly _features;
    constructor(properties?: FeatureSetProperties);
    /**
     * Reads a stream of features into a {@link data/FeatureSet!FeatureSet}.
     *
     * @param features The features to read.
     * @param properties Optional properties for the new feature set.
     */
    static fromFeatureStream(features: AsyncIterable<Feature>, properties?: FeatureSetProperties): Promise<FeatureSet>;
    /**
     * Sets the values of this object's properties.
     *
     * @param properties An object containing property values to set.
     */
    assignProperties(properties: Partial<FeatureSetProperties>): void;
    /**
     * @inheritDoc
     */
    assignPropertiesAsync(properties: Partial<FeatureSetProperties>): Promise<void>;
    /**
     * @inheritDoc
     */
    finishAssignProperties(): Promise<void>;
    /**
     * Indicates whether or not the set contains the specified element.
     *
     * @param feature The element to test for.
     */
    has(feature: Feature): boolean;
    /**
     * @inheritDoc
     */
    entries(): SetIterator<[Feature, Feature]>;
    /**
     * @inheritDoc
     */
    keys(): SetIterator<Feature>;
    /**
     * @inheritDoc
     */
    values(): SetIterator<Feature>;
    /**
     * Returns a serializable representation of the feature set.
     *
     * @param serializeMode If specified, only properties that are appropriate
     *   for the given mode are returned. Otherwise, all properties will be
     *   serialized.
     */
    toJSON(serializeMode?: SerializeMode): FeatureSetProperties;
    /**
     * @inheritDoc
     */
    toItemUri(): string;
    /**
     * @inheritDoc
     */
    add(feature: Feature): this;
    /**
     * @inheritDoc
     */
    addMany(features: Iterable<Feature>): this;
    /**
     * @inheritDoc
     */
    clear(): void;
    /**
     * @inheritDoc
     */
    delete(feature: Feature): boolean;
    /**
     * @inheritDoc
     */
    deleteMany(features: Iterable<Feature>): boolean;
    /**
     * @param callbackfn Function to execute for each element.
     * @param thisArg Value to use as `this` when executing callback.
     * @inheritDoc
     */
    forEach(callbackfn: (value: Feature, value2: Feature, set: Set<Feature>) => void, thisArg?: unknown): void;
    /**
     * Finds a feature in the set with the given ID, or undefined if there is no
     * match.
     *
     * @param id The ID to search for.
     */
    findById(id: string): Feature;
    /**
     * Finds a feature in the set with the given primary key, or undefined if
     * there is no match.
     *
     * @param primaryKey The primary key to search for.
     */
    findByPrimaryKey(primaryKey: string): Feature;
    /**
     * 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>;
    /**
     * Gets the object's default property values.
     */
    getDefaults(): Partial<FeatureSetProperties>;
    /**
     * 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 FeatureSetProperties>(key: K): FeatureSetProperties[K];
    /**
     * Returns each element in the set in insertion order.
     */
    [Symbol.iterator](): SetIterator<Feature>;
    protected _add(feature: Feature, notify?: boolean): this;
    /**
     * @inheritDoc
     */
    protected _delete(feature: Feature, notify?: boolean): boolean;
    /**
     * @inheritDoc
     */
    protected _getSerializableProperties(): PropertyDefs<FeatureSetProperties>;
}
export {};
