import type FormTemplate from "../../../form/FormTemplate.js";
import type EditingCapabilities from "../../../layers/support/EditingCapabilities.js";
import type { EditingCapabilitiesProperties } from "../../../layers/support/EditingCapabilities.js";
import type { AttachmentCapabilities, CreateCapabilities, DeleteCapabilities, RelationshipCapabilities, UpdateCapabilities } from "../../../layers/support/types.js";
import type { LayerInfo } from "../types.js";

/** @since 5.0 */
export interface EditorEditingCapabilitiesProperties extends EditingCapabilitiesProperties, Partial<Pick<EditorEditingCapabilities, "layerInfo">> {}

/**
 * The current editing capabilities for the provided layer and read by the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html). This takes into
 * account what is set on the [EditorItem.layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-support-EditorItem.html#layerInfo)
 *
 * @since 5.0
 */
export default class EditorEditingCapabilities extends EditingCapabilities {
  constructor(properties: EditorEditingCapabilitiesProperties);
  /**
   * Specific permissions for attachment operations. It takes into account the [Editor's layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) settings.
   *
   * @since 5.0
   */
  get attachments(): AttachmentCapabilities;
  /**
   * Specific permissions for create operations. It takes into account the [Editor's layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) settings.
   *
   * @since 5.0
   */
  get create(): CreateCapabilities;
  /**
   * The default editing capabilities for the provided layer. This does not take into account what may be set on the [EditorItem.layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-support-EditorItem.html#layerInfo) settings.
   *
   * @since 5.0
   */
  get defaults(): EditingCapabilities;
  /**
   * Specific permissions for delete operations. It takes into account the [Editor's layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) settings.
   *
   * @since 5.0
   */
  get delete(): DeleteCapabilities;
  /**
   * The primary form template in use. It takes into account the Editor's [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) and whether a form template is set on a `layerInfo` within it. If so, the form template set on a [LayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) within the Editor takes precedence over a form template set directly on a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html). A form template set within the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget's [layerInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) takes priority over a form template set directly on a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) or [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html).
   *
   * @since 5.0
   */
  get formTemplate(): FormTemplate | null | undefined;
  /**
   * The layer's associated [LayerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) .
   *
   * @since 5.0
   */
  accessor layerInfo: LayerInfo | null | undefined;
  /**
   * Indicates if the layer contains at least one relationship in addition to child [Workflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html) permissions. It takes into account what is set on the [EditorItem.layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-support-EditorItem.html#layerInfo). It does not take into account whether a parent or related layer has the ability to edit. A collection of all [EditorItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-support-EditorItem.html) that represent potential related layers should be referenced if accessing editing permissions per related layer.
   *
   * @since 5.0
   */
  get relationship(): RelationshipCapabilities;
  /**
   * Specific permissions for update operations. It takes into account the [Editor's layerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-types.html#LayerInfo) settings.
   *
   * @since 5.0
   */
  get update(): UpdateCapabilities;
}