import type Collection from "../../core/Collection.js";
import type KMLLayer from "../KMLLayer.js";
import type { EventedMixin, EventedMixinProperties } from "../../core/Evented.js";
import type { JSONSupportMixin, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
import type { Loadable, LoadableMixinProperties } from "../../core/Loadable.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";

export interface KMLSublayerProperties extends LoadableMixinProperties, JSONSupportMixinProperties, EventedMixinProperties, Partial<Pick<KMLSublayer, "description" | "id" | "layer" | "parent" | "sourceJSON" | "title" | "visible">> {
  /** A collection of [KMLSublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-KMLSublayer.html). */
  sublayers?: ReadonlyArrayOrCollection<KMLSublayerProperties> | null;
}

/**
 * Represents a sublayer in a [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html).
 *
 * @since 4.5
 */
export default abstract class KMLSublayer extends KMLSublayerSuperclass {
  /** Description for the KML sublayer. */
  accessor description: string | null | undefined;
  /** The id for the KML sublayer. */
  accessor id: number;
  /** The [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html) to which the sublayer belongs. */
  accessor layer: KMLLayer | null | undefined;
  /** Network link info for the current layer. A link info object with properties that describe the network link. */
  get networkLink(): any | null | undefined;
  /**
   * The parent layer to which the sublayer belongs.
   *
   * @since 4.27
   */
  accessor parent: KMLSublayer | KMLLayer | null | undefined;
  /**
   * The raw KML data for this sublayer, in JSON format, as returned by the
   * [KML utility service](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#ConfigWithKmlServiceUrl).
   *
   * @since 4.14
   */
  accessor sourceJSON: any;
  /** A collection of [KMLSublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-KMLSublayer.html). */
  get sublayers(): Collection<KMLSublayer> | null | undefined;
  set sublayers(value: ReadonlyArrayOrCollection<KMLSublayerProperties> | null | undefined);
  /**
   * The title of the KML sublayer used to identify it in places such as the
   * [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) and [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   */
  accessor title: string | null | undefined;
  /** Indicates if the sublayer is visible in the view. */
  accessor visible: boolean;
}
declare const KMLSublayerSuperclass: typeof Loadable & typeof JSONSupportMixin & typeof EventedMixin