import Collection from "@arcgis/core/core/Collection";
import type Extent from "@arcgis/core/geometry/Extent";
import type { EntityBaseProperties } from "../Entity.js";
import { EntityBase } from "../Entity.js";
import { Hyperlink } from "../Hyperlink.js";
import type { FeatureSource, FeatureSourceProperties, FeatureWriteOptions } from "../data/FeatureSource.js";
import { FeatureReadOptions } from "../data/FeatureSource.js";
import type { MenuProperties } from "../menus/Menu.js";
import { Menu } from "../menus/Menu.js";
import type { Action } from "../support/Action.js";
import type { InitializableBase } from "../support/InitializableBase.js";
import type { PropertyDefs } from "../support/Serializable.js";
import type { QueryService } from "../tasks/query/QueryService.js";
import { CollectionProxy } from "../utilities/CollectionProxy.js";
import type { Attachment, AttachmentProperties } from "./Attachment.js";
import type { Capabilities } from "./Capabilities.js";
import type { Feature } from "./Feature.js";
import { FeatureSettings } from "./FeatureSettings.js";
import { Schema, type SchemaProperties } from "./Schema.js";
import { TaskSettings } from "./TaskSettings.js";
import type { RelationshipProperties } from "./_Relationship.js";
import { Relationship } from "./_Relationship.js";
/**
 * Properties that can be passed into the constructor for
 * {@link data/FeatureSourceBase!FeatureSourceBase}.
 */
export interface FeatureSourceBaseProperties extends FeatureSourceProperties, EntityBaseProperties {
    /**
     * A menu for actions specifically related to features from this source.
     */
    featureActions?: Menu | MenuProperties;
    /**
     * A menu for actions specifically related to this source.
     */
    featureSourceActions?: Menu | MenuProperties;
}
/**
 * A base implementation for {@link data/FeatureSource!FeatureSource}.
 */
export declare abstract class FeatureSourceBase<TProperties extends FeatureSourceBaseProperties = FeatureSourceBaseProperties> extends EntityBase<TProperties> implements FeatureSource {
    /**
     * @inheritDoc
     */
    iconUrl?: string;
    /**
     * @inheritDoc
     */
    onAddFeature?: Action;
    /**
     * @inheritDoc
     */
    onEditFeature?: Action;
    /**
     * A menu for actions specifically related to features from this source.
     */
    get featureActions(): Menu | undefined;
    set featureActions(value: Menu | undefined);
    /**
     * A menu for actions specifically related to this source.
     */
    get featureSourceActions(): Menu | undefined;
    set featureSourceActions(value: Menu | undefined);
    /**
     * An optional query service that the feature source can use to get
     * features.
     */
    queryService?: QueryService;
    /**
     * @inheritDoc
     */
    get capabilities(): Capabilities;
    get featureSettings(): FeatureSettings;
    /**
     * @inheritDoc
     */
    get taskSettings(): TaskSettings;
    /**
     * @inheritDoc
     */
    get schema(): Schema;
    /**
     * @inheritDoc
     */
    get hyperlinks(): Collection<Hyperlink>;
    /**
     * @inheritDoc
     */
    get relationships(): Collection<Relationship>;
    /**
     * @inheritDoc
     */
    abstract get title(): string;
    private _featureActions;
    private _featureSourceActions;
    private _featureSettings;
    private _taskSettings;
    private _schema;
    private _hyperlinks;
    private _relationships;
    /**
     * @inheritDoc
     */
    getFullExtent(): Extent | undefined;
    /**
     * @inheritDoc
     */
    getAttachments(feature: Feature): Promise<Attachment[]>;
    /**
     * @inheritDoc
     */
    addAttachment(feature: Feature, attachment: Attachment | AttachmentProperties | File): Promise<Attachment>;
    /**
     * @inheritDoc
     */
    deleteAttachments(feature: Feature, attachments: (Attachment | string)[]): Promise<void>;
    /**
     * @inheritDoc
     */
    getFeature(id: string, options?: FeatureReadOptions): Promise<Feature>;
    /**
     * @inheritDoc
     */
    getFeatures(ids: string[], options?: FeatureReadOptions): AsyncIterable<Feature>;
    /**
     * @inheritDoc
     */
    addFeature(feature: Feature, _options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    addFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    updateFeature(feature: Feature, _options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    updateFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    deleteFeature(id: string, options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    deleteFeature(feature: Feature, options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    deleteFeatures(ids: Iterable<string>, options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    deleteFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    protected _getSerializableProperties(): PropertyDefs<TProperties>;
    protected _initializableChildCollections(): IterableIterator<Collection<InitializableBase<unknown>>>;
    protected _onInitialize(): Promise<void>;
    protected _postInitialize(): Promise<void>;
    /**
     * Called to create the {@link data/Schema!Schema} for this feature source.
     *
     * @param properties Initial properties for the schema.
     */
    protected _createSchema(properties?: SchemaProperties): Schema;
    /**
     * Called to create the {@link data/FeatureSettings!FeatureSettings} for this
     * feature source.
     */
    protected _createFeatureSettings(): FeatureSettings;
    /**
     * Called to create the {@link data/TaskSettings!TaskSettings} for this
     * feature source.
     */
    protected _createTaskSettings(): TaskSettings;
    /**
     * Called to create the {@link data/_Relationship!Relationship} collection
     * for this feature source.
     */
    protected _createRelationships(): Collection<Relationship>;
    /**
     * Called to create the {@link Hyperlink} collection for this feature source.
     */
    protected _createHyperlinks(): Collection<Hyperlink>;
    /**
     * Called to retrieve attachments for a feature. Subclasses must override
     * this if they support feature attachments.
     *
     * @param feature The feature to get attachments for.
     */
    protected _getAttachments(feature: Feature): Promise<Attachment[]>;
    /**
     * Called to add an attachment to a feature. Subclasses must override this
     * if they support feature attachments.
     *
     * @param feature The feature to add the attachment to.
     * @param attachment The attachment to add to the feature.
     */
    protected _addAttachment(feature: Feature, attachment: Attachment | AttachmentProperties | File): Promise<Attachment>;
    /**
     * Called to remove attachments from a feature. Subclasses must override
     * this if they support feature attachments.
     *
     * @param feature The feature to delete attachments from.
     * @param attachments The attachments or the IDs of the attachments to
     *   delete.
     */
    protected _deleteAttachments(feature: Feature, attachments: (Attachment | string)[]): Promise<void>;
    /**
     * Called to retrieve features. Subclasses must override this if they
     * support querying for features.
     *
     * @param ids The unique IDs of features to retrieve.
     * @param options Options that control what gets returned.
     */
    protected _getFeatures(ids: string[], options?: FeatureReadOptions): AsyncIterable<Feature>;
    /**
     * Called to add new features. Subclasses must override this if they support
     * adding features.
     *
     * @param features The features to add.
     * @param options Additional options that control how the feature is saved.
     */
    protected _addFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    /**
     * Called to update features. Subclasses must override this if they support
     * updating features.
     *
     * @param features The feature to update.
     * @param options Additional options that control how the feature is saved.
     */
    protected _updateFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    /**
     * Called to delete features. Subclasses must override this if they support
     * deleting features.
     *
     * @param ids The IDs of the features to delete.
     * @param options Additional options that control how the features are
     *   deleted.
     */
    protected _deleteFeatures(ids: string[], options?: FeatureWriteOptions): Promise<void>;
    /**
     * The capabilities of the feature source.
     */
    protected _capabilities(): Capabilities;
    protected _isRelationship(relationship: Relationship | RelationshipProperties): boolean;
    private _createAndSetupSchema;
    private _createAndSetupFeatureSettings;
}
/**
 * Backing implementation for FeatureSourceBase.relationships.
 */
export declare class RelationshipCollection extends CollectionProxy<Relationship> {
    /**
     * Feature source that owns this collection.
     */
    protected _source: FeatureSource;
    constructor(parent: FeatureSource);
    add(relationship: Relationship, index?: number): this;
    removeAt(index: number): Relationship;
}
