import type Accessor from "../../core/Accessor.js";
import type SharedTemplateMetadata from "../../editing/sharedTemplates/SharedTemplateMetadata.js";
import type FeatureTemplate from "../../layers/support/FeatureTemplate.js";
import type { LayerWithFeatureTemplatesUnion } from "../../layers/types.js";

export interface TemplateItemProperties extends Partial<Pick<TemplateItem, "description" | "label" | "layer" | "template" | "thumbnail">> {}

/**
 * The item displayed within the [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html) widget.
 *
 * @since 4.10
 * @see [FeatureTemplates](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html)
 * @see [FeatureTemplatesViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-FeatureTemplatesViewModel.html)
 * @see [FeatureTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html)
 * @see [TemplateItemGroup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates-TemplateItemGroup.html)
 */
export default class TemplateItem extends Accessor {
  constructor(properties?: TemplateItemProperties);
  /**
   * The description that is displayed for the template item.
   * This is similar to the description provided in [FeatureTemplate.description](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html#description).
   */
  accessor description: string | null | undefined;
  /**
   * The label that is displayed for the template item.
   * This is similar to the name provided in [FeatureTemplate.name](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html#name).
   */
  accessor label: string | null | undefined;
  /** The layer associated with the template item. */
  accessor layer: LayerWithFeatureTemplatesUnion;
  /** The associated [FeatureTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html) for the item. */
  accessor template: FeatureTemplate | SharedTemplateMetadata;
  /**
   * An object used to create a thumbnail image that represents a feature type in the feature template.
   * This is similar to [FeatureTemplate.thumbnail](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureTemplate.html#thumbnail).
   */
  accessor thumbnail: HTMLElement | null | undefined;
  /**
   * Creates a deep clone of the template item object.
   *
   * @returns Returns a deep clone of the template item.
   */
  clone(): TemplateItem;
}