import type Graphic from "../../Graphic.js";
import type CreateFeaturesWorkflowData from "./CreateFeaturesWorkflowData.js";
import type Workflow from "./Workflow.js";
import type { ReadonlyCollection } from "../../core/Collection.js";
import type { CreateFeatureState, CreateFeaturesWorkflowStep } from "./types.js";
import type { WorkflowProperties } from "./Workflow.js";

export interface CreateFeaturesWorkflowProperties extends WorkflowProperties {}

/**
 * A read-only class containing the logic used when creating features using
 * the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget. This workflow provides continuous creation of multiple features of the same type at once. After the initial sketch is created, the attribute form will display with the set field elements. These fields can be updated as the user creates new features. This workflow is designed for both individual and multiple feature creation.
 *
 *
 * ![create-feature](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/editor/initial-editor-panel2.png)
 *
 * > [!WARNING]
 * >
 * > This workflow is only enabled if the feature service allows this operation.
 *
 * @since 4.23
 * @see [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html)
 * @see [Workflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-Workflow.html)
 * @see [UpdateWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-UpdateWorkflow.html)
 * @see [Programming patterns: Widget viewModel pattern](https://developers.arcgis.com/javascript/latest/programming-patterns/#widget-viewmodel-pattern)
 * @see [Sample - Edit features with the Editor widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-basic/)
 * @see [Sample - Edit features in 3D with the Editor widget](https://developers.arcgis.com/javascript/latest/sample-code/editor-3d/)
 * @see [Sample - Editor widget with configurations](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-configurable/)
 */
export default class CreateFeaturesWorkflow extends Workflow<CreateFeaturesWorkflowData, CreateFeaturesWorkflowStep> {
  constructor(properties?: CreateFeaturesWorkflowProperties);
  /**
   * Indicates the current feature state during creation. This state is either 1) while creating a new feature, or 2) updating a pending feature while in the "creating-features" step.
   *
   * @default "create-new"
   */
  get createFeatureState(): CreateFeatureState;
  /**
   * The shared workflow data.
   *
   * @since 4.30
   */
  get data(): CreateFeaturesWorkflowData;
  /**
   * Returns the number of pending features of an active [CreateFeaturesWorkflow](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateFeaturesWorkflow.html). Returns 0 (zero) if no workflow is active or the workflow type is not matching.
   *
   * @see [pendingFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateFeaturesWorkflow.html#pendingFeatures)
   */
  get numPendingFeatures(): number;
  /**
   * Returns a collection of [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) representing features that are currently pending in the [CreateFeaturesWorkflowData](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateFeaturesWorkflowData.html).
   *
   * @see [numPendingFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-CreateFeaturesWorkflow.html#numPendingFeatures)
   */
  get pendingFeatures(): ReadonlyCollection<Graphic>;
  /**
   * Moves the pending feature into update mode.
   *
   * @param feature - The pending feature to be updated.
   * @returns Resolves when successfully moves the pending feature into update mode.
   */
  updatePendingFeature(feature: Graphic): Promise<void>;
}