import { Evented } from "@arcgis/core/core/Evented.js";
import type { AfterItemChangeEvent } from "./collection.js";
/**
 * Raised when items are added or removed from an {@link ObservableSet}.
 */
export interface SetChangeEvent<T> {
    /**
     * The items that were added.
     */
    added: T[];
    /**
     * The items that were removed.
     */
    removed: T[];
    /**
     * The items that were moved.
     */
    moved: T[];
    /**
     * The {@link ObservableSet} that raised the event.
     */
    target: ObservableSet<T>;
}
/**
 * Raised after an item is added or removed from an {@link ObservableSet}.
 */
export interface SetAfterItemEvent<T> extends AfterItemChangeEvent<ObservableSet<T>, T> {
}
/**
 * A type that Sets event names to their corresponding event object types for an
 * {@link ObservableSet}.
 */
export interface SetEvents<T> {
    /**
     * Fires after an item has been Added or removed from the Set. From the
     * Collection.
     */
    change: SetChangeEvent<T>;
    /**
     * Fires after an item has been added to the Set.
     */
    "after-add": SetAfterItemEvent<T>;
    /**
     * Fires after an item has been removed from the Set.
     */
    "after-remove": SetAfterItemEvent<T>;
}
declare const ObservableSet_base: typeof Evented & (abstract new (...args: any[]) => import("../support/observableUtils.js").ObservableMixin);
/**
 * A Set that supports observability.
 */
export declare class ObservableSet<T> extends ObservableSet_base implements Set<T> {
    /**
     * @deprecated Do not directly reference this property. Use EventNames and
     *   EventTypes helpers from @arcgis/core/Evented.
     */
    "@eventTypes": SetEvents<T>;
    /**
     * Used by Object.toString().
     */
    readonly [Symbol.toStringTag] = "ObservableSet";
    /**
     * The number of elements in the set.
     */
    get size(): number;
    /**
     * The underlying set that this class is wrapping.
     */
    protected _originalSet: Set<T>;
    constructor();
    /**
     * Adds an element to the set.
     *
     * @param value The value to add.
     */
    add(value: T): this;
    /**
     * Adds elements to the set.
     *
     * @param values The values to add.
     */
    addMany(values: Iterable<T>): this;
    /**
     * Removes all elements.
     */
    clear(): void;
    /**
     * Removes the specified element.
     *
     * @param value The element to remove.
     * @returns True if an element was deleted, otherwise false.
     */
    delete(value: T): boolean;
    /**
     * Removes the specified elements.
     *
     * @param values The elements to remove.
     * @returns True if an element was deleted, otherwise false.
     */
    deleteMany(values: Iterable<T>): boolean;
    /**
     * Executes a provided function once per each element in the set.
     *
     * @param callbackfn Function to execute for each element.
     * @param thisArg Value to use as `this` when executing callback.
     */
    forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: unknown): void;
    /**
     * Indicates whether or not the set contains the specified element.
     *
     * @param value The element to test for.
     */
    has(value: T): boolean;
    /**
     * Returns each element in the set in insertion order.
     */
    entries(): SetIterator<[T, T]>;
    /**
     * Returns each element in the set in insertion order.
     */
    keys(): SetIterator<T>;
    /**
     * Returns each element in the set in insertion order.
     */
    values(): SetIterator<T>;
    /**
     * Returns each element in the set in insertion order.
     */
    [Symbol.iterator](): SetIterator<T>;
    /**
     * Returns a serializable representation of the set.
     */
    toJSON(): unknown;
}
export {};
