import Collection from "@arcgis/core/core/Collection";
import type FeatureTemplate from "@arcgis/core/layers/support/FeatureTemplate.js";
import type FeatureType from "@arcgis/core/layers/support/FeatureType.js";
import type Field from "@arcgis/core/layers/support/Field";
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
import type { Attachment, AttachmentProperties } from "../data/Attachment.js";
import type { Feature } from "../data/Feature.js";
import type { FeatureSettings } from "../data/FeatureSettings.js";
import type { FeatureReadOptions, FeatureSource, FeatureWriteOptions } from "../data/FeatureSource.js";
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
import type { Schema } from "../data/Schema.js";
import type { Relationship } from "../data/_Relationship.js";
import { type SublayerJson } from "../json/SublayerJson.js";
import type { InitializableCollection } from "../support/InitializableCollectionProxy.js";
import { ArcGISRelationshipCollection } from "../support/_ArcGISRelationshipCollection.js";
import type { GeometryType, SublayerLike } from "../support/esri.js";
import type { SubtypeGroupLayerExtension } from "./SubtypeGroupLayerExtension.js";
import type { LayerExtensionSchemaPropertyBinding } from "./_LayerExtension.js";
import type { SublayerExtensionProperties, SublayerProperties } from "./_SublayerExtension.js";
import { SublayerExtension, SublayerSchema } from "./_SublayerExtension.js";
import type { LayerListSettings, LayerListSettingsProperties } from "./support/LayerListSettings.js";
/**
 * Properties that can be specified for the
 * {@link SubtypeSublayerExtensionProperties.sublayer} property.
 */
export interface SubtypeSublayerProperties extends SublayerProperties, SublayerJson {
}
/**
 * Properties that can be passed into the constructor for
 * {@link SubtypeSublayerExtension}.
 */
export interface SubtypeSublayerExtensionProperties extends Omit<SublayerExtensionProperties, "sublayer" | "sublayerExtensions"> {
    /**
     * See {@link mapping/_SublayerExtension!SublayerExtension.sublayer}.
     */
    sublayer?: SubtypeSublayer | SubtypeSublayerProperties;
}
/**
 * A collection of sublayer extensions belonging to a ArcGISLayerExtension.
 */
export interface SubtypeSublayerExtensionCollection<S extends SubtypeSublayerExtension = SubtypeSublayerExtension> extends InitializableCollection<SubtypeSublayerExtensionProperties, SubtypeSublayerExtension> {
    /**
     * Get the sublayer extension for a given id.
     *
     * @param id The id of the sublayer extension.
     * @returns The sublayer extension.
     */
    findById(id: string): S;
    /**
     * Get the corresponding sublayer extension for a given sublayer id.
     *
     * @param id The id of the sublayer.
     * @returns The corresponding sublayer extension.
     */
    findBySublayerId(id: number): S;
    /**
     * Gets the corresponding sublayer extension for a given sublayer.
     *
     * @param sublayer A sublayer.
     * @returns The corresponding sublayer extension.
     */
    forSublayer(sublayer: SubtypeSublayer): S;
}
/**
 * Extends the capabilities of an Esri SubtypeSublayer object.
 */
export declare class SubtypeSublayerExtension<TProperties extends SubtypeSublayerExtensionProperties = SubtypeSublayerExtensionProperties> extends SublayerExtension<TProperties> {
    get supportsSublayers(): boolean;
    get layerExtension(): SubtypeGroupLayerExtension;
    get renderer(): RendererUnion | undefined;
    get hasFeatures(): boolean;
    get sublayer(): SubtypeSublayer;
    get sublayerExtensions(): SubtypeSublayerExtensionCollection<this>;
    /**
     * A list of the valid file MIME types that can be uploaded as attachments.
     * These are configured on the parent SubtypeGroupLayerExtension.
     */
    get attachmentTypes(): string[] | undefined;
    get canChangeLabels(): boolean;
    get canChangeRenderer(): boolean;
    get canChangeOpacity(): boolean;
    /**
     * A list of default templates for the sublayer from the feature service, to
     * use when the webmap does not properly define them.
     */
    get defaultTemplates(): FeatureTemplate[] | undefined;
    protected _addAttachment(feature: Feature, attachment: Attachment | AttachmentProperties | File): Promise<Attachment>;
    protected _deleteAttachments(feature: Feature, attachments: (Attachment | string)[]): Promise<void>;
    /**
     * @inheritDoc
     */
    protected _isSupportedSublayer(sublayer: SublayerLike): boolean;
    protected _createLayerListSettings(properties?: LayerListSettingsProperties): LayerListSettings;
    protected _createFeatureSettings(): FeatureSettings;
    /**
     * @inheritDoc
     */
    protected _createSublayer(properties: SubtypeSublayerProperties): Promise<SubtypeSublayer>;
    protected _createSchema(): Schema;
    protected _createRelationships(): Collection<Relationship>;
    /**
     * @inheritDoc
     */
    protected _applySublayerProperties(properties: SubtypeSublayerProperties, sublayer: SubtypeSublayer): Promise<void>;
    protected _capabilities(): QuerySourceCapabilities;
    protected _onInitialize(): Promise<void>;
    protected _postInitialize(): Promise<void>;
    protected _getFeatures(ids: string[], options?: FeatureReadOptions): AsyncIterable<Feature>;
    protected _getAttachments(feature: Feature): Promise<Attachment[]>;
    protected _addFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    protected _updateFeatures(features: Iterable<Feature>, options?: FeatureWriteOptions): Promise<void>;
    protected _deleteFeatures(ids: string[], options?: FeatureWriteOptions): Promise<void>;
    /**
     * @inheritDoc
     */
    protected _serializeSublayer(sublayer: SubtypeSublayer): SubtypeSublayerProperties;
    private _addDomainsToFields;
}
/**
 * An implementation of SublayerSchema specific to SubtypeSublayers.
 */
export declare class SubtypeSublayerSchema extends SublayerSchema {
    private static readonly _subtypesWatchHandlesKey;
    /**
     * The sublayer that the Schema represents.
     */
    protected readonly _sublayerExtension: SubtypeSublayerExtension;
    private readonly _fieldCollection;
    private readonly _readonlyTypesCollection;
    private readonly _typesCollection;
    get primaryKeyField(): string;
    set primaryKeyField(value: string);
    get geometryType(): GeometryType;
    set geometryType(value: GeometryType);
    get displayField(): string;
    set displayField(value: string);
    get typeIdField(): string;
    set typeIdField(value: string);
    get types(): Collection<FeatureType>;
    constructor(layerExtension: SubtypeSublayerExtension);
    destroy(): void;
    get _fields(): Collection<Field>;
    /**
     * Creates the backing collection for fields.
     */
    protected _createFieldCollection(): Collection<Field>;
    protected _getPropertyBindings(): Partial<Record<keyof this, LayerExtensionSchemaPropertyBinding>>;
}
/**
 * Implementation of the
 * {@link support/_ArcGISRelationshipCollection!ArcGISRelationshipCollection}
 * specific to SubtypeSublayer.
 */
export declare class SubtypeSublayerRelationshipCollection extends ArcGISRelationshipCollection {
    /**
     * @inheritDoc
     */
    protected readonly _source: SubtypeSublayerExtension;
    /**
     * @inheritDoc
     */
    protected get _sourceUrl(): string;
    /**
     * @inheritDoc
     */
    protected get _sourceLayerId(): number;
    /**
     * @inheritDoc
     */
    protected _findRelatedSource(relatedLayerId: number): FeatureSource;
}
