/// <reference path="../../index.d.ts" />
import type Collection from "@arcgis/core/core/Collection.js";
import type VersioningState from "@arcgis/core/versionManagement/VersioningState.js";
import type MapView from "@arcgis/core/views/MapView.js";
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { ArcgisReferenceElement } from "../types.js";
import type { InitialVersionInfo, VersioningStateEvent } from "./types.js";
import type { T9nMeta } from "@arcgis/lumina/controllers";
import type { VersionManagerState } from "@arcgis/core/versionManagement/VersionManager.js";

/**
 * The Version Management component allows users to view available versions, change versions, delete versions, and alter versions.
 * The [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/) will update to match the features on the selected version.
 * To learn more about version management please visit the [versioning guide doc](https://developers.arcgis.com/javascript/latest/utility-network/version-management-service/).
 *
 * > The Version Management component does not support proxied feature services or feature services that utilize stored credentials.
 *
 * Note: Sign in to access the data in this sample, U/P: `viewer01`/`I68VGU^nMurF`
 *
 * @since 4.29
 */
export abstract class ArcgisVersionManagement extends LitElement {
  /** @default false */
  accessor allowEditingDisabled: boolean;
  /**
   * If true, the component will not be destroyed automatically when it is
   * disconnected from the document. This is useful when you want to move the
   * component to a different place on the page, or temporarily hide it. If this
   * is set, make sure to call the [destroy()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-version-management/#destroy) method when you are done to
   * prevent memory leaks.
   *
   * @default false
   */
  accessor autoDestroyDisabled: boolean;
  /** @default false */
  accessor closable: boolean;
  /**
   * Icon which represents the component.
   * Typically used when the component is controlled by another component (e.g. by the Expand component).
   *
   * @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/)
   */
  accessor icon: string | undefined;
  /**
   * The `initialVersionInfos` property enables users to initialize the Version Management component with a predefined set of versions.
   * By providing an array of `InitialVersionInfo`, the component displays a specified version for each feature service upon initialization.
   */
  accessor initialVersionInfos: InitialVersionInfo[];
  accessor label: string | undefined;
  /**
   * Replace localized message strings with your own strings.
   *
   * _**Note**: Individual message keys may change between releases._
   */
  accessor messageOverrides: {
      label?: string | undefined;
      actions?: {
          cancelSave?: string | undefined;
          deleteVersion?: string | undefined;
          editVersion?: string | undefined;
          newVersion?: string | undefined;
          refreshVersions?: string | undefined;
          saveVersion?: string | undefined;
          searchVersions?: string | undefined;
          switchToVersion?: string | undefined;
      } | undefined;
      accessLevels?: {
          private?: string | undefined;
          protected?: string | undefined;
          public?: string | undefined;
      } | undefined;
      executionErrors?: {
          invalidVersionName?: string | undefined;
          noFeatureServiceFound?: string | undefined;
          notValidEnterpriseVersion?: string | undefined;
          noVersionManagementServiceFound?: string | undefined;
      } | undefined;
      headers?: {
          currentVersion?: string | undefined;
          manageVersions?: string | undefined;
          filterVersions?: string | undefined;
          versionProperties?: string | undefined;
          invalidInitialVersion?: string | undefined;
          invalidInitialFeatureService?: string | undefined;
      } | undefined;
      input?: {
          versionAccess?: string | undefined;
          versionDescription?: string | undefined;
          versionName?: string | undefined;
          versionOwner?: string | undefined;
      } | undefined;
      labels?: { versionList?: string | undefined; } | undefined;
      loadErrors?: {
          invalidInitialVersion?: string | undefined;
          invalidInitialFeatureService?: string | undefined;
          noFeatureServices?: string | undefined;
          noViewProperty?: string | undefined;
      } | undefined;
      validationErrors?: { invalidCharacters?: string | undefined; } | undefined;
  };
  /** @internal */
  protected messages: {
      label: string;
      actions: {
          cancelSave: string;
          deleteVersion: string;
          editVersion: string;
          newVersion: string;
          refreshVersions: string;
          saveVersion: string;
          searchVersions: string;
          switchToVersion: string;
      };
      accessLevels: {
          private: string;
          protected: string;
          public: string;
      };
      executionErrors: {
          invalidVersionName: string;
          noFeatureServiceFound: string;
          notValidEnterpriseVersion: string;
          noVersionManagementServiceFound: string;
      };
      headers: {
          currentVersion: string;
          manageVersions: string;
          filterVersions: string;
          versionProperties: string;
          invalidInitialVersion: string;
          invalidInitialFeatureService: string;
      };
      input: {
          versionAccess: string;
          versionDescription: string;
          versionName: string;
          versionOwner: string;
      };
      labels: { versionList: string; };
      loadErrors: {
          invalidInitialVersion: string;
          invalidInitialFeatureService: string;
          noFeatureServices: string;
          noViewProperty: string;
      };
      validationErrors: { invalidCharacters: string; };
  } & T9nMeta<{
      label: string;
      actions: {
          cancelSave: string;
          deleteVersion: string;
          editVersion: string;
          newVersion: string;
          refreshVersions: string;
          saveVersion: string;
          searchVersions: string;
          switchToVersion: string;
      };
      accessLevels: {
          private: string;
          protected: string;
          public: string;
      };
      executionErrors: {
          invalidVersionName: string;
          noFeatureServiceFound: string;
          notValidEnterpriseVersion: string;
          noVersionManagementServiceFound: string;
      };
      headers: {
          currentVersion: string;
          manageVersions: string;
          filterVersions: string;
          versionProperties: string;
          invalidInitialVersion: string;
          invalidInitialFeatureService: string;
      };
      input: {
          versionAccess: string;
          versionDescription: string;
          versionName: string;
          versionOwner: string;
      };
      labels: { versionList: string; };
      loadErrors: {
          invalidInitialVersion: string;
          invalidInitialFeatureService: string;
          noFeatureServices: string;
          noViewProperty: string;
      };
      validationErrors: { invalidCharacters: string; };
  }>;
  accessor mode: string | undefined;
  /**
   * Specifies the number of versions displayed on each page of the Version Management component.
   *
   * @default 5
   */
  accessor pageSize: number;
  /**
   * By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.
   *
   * @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component)
   */
  accessor referenceElement: ArcgisReferenceElement | string | undefined;
  /**
   * The current component state.
   *
   * * `disabled` -  an error occured during initialization
   * * `executing` - an operation is being performed
   * * `failed` - an error occurred during execution
   * * `loading` - the object is loading
   * * `ready` - object loaded successfully or operation completed successfully
   *
   * When the component is ready, all items in [versioningStates](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-version-management/#versioningStates) are loaded.
   *
   * @since 5.0
   */
  get state(): VersionManagerState;
  /**
   * This class provides functionality for managing versions in a versioned geodatabase.
   * In the event that the Version Management component is destroyed, the VersioningStates can be utilized to maintain the current state of the Version Management component.
   * The Version Management component can be reinitialized using a `Collection<VersioningState>`, or a predefined `Collection<VersioningState>` can be provided during the initial instantiation of the Version Management component.
   *
   * @since 5.0
   */
  accessor versioningStates: Collection<VersioningState>;
  /**
   * This property defines the target [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
   *
   * @since 5.0
   */
  accessor view: MapView | undefined;
  /** Permanently destroy the component. */
  destroy(): Promise<void>;
  /** Emitted when the component associated with a map or scene view is ready to be interacted with. */
  readonly arcgisReady: import("@arcgis/lumina").TargetedEvent<this, void>;
  readonly arcgisVersioningStateChanged: import("@arcgis/lumina").TargetedEvent<this, VersioningStateEvent>;
  readonly "@eventTypes": {
    arcgisReady: ArcgisVersionManagement["arcgisReady"]["detail"];
    arcgisVersioningStateChanged: ArcgisVersionManagement["arcgisVersioningStateChanged"]["detail"];
  };
}