/**
 * Provides utility methods for creating [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html).
 *
 * @since 4.30
 */
import type WebMap from "../WebMap.js";
import type Collection from "../core/Collection.js";
import type VersioningState from "./VersioningState.js";
import type View from "../views/View.js";
import type { VersionAdapter } from "./versionAdapters/types.js";

/**
 * Used to create a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html).
 *
 * @param input - Input used to to create a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html).
 * @param usePersistentReadSessions - If set to `true`, the current version will have a read lock. Additionally, when switching versions, the new current version will also have a read lock.
 * @returns When resolved, a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html) is returned.
 * @example
 * const webmap = new WebMap({
 *   portalItem: { // autocasts as new PortalItem()
 *     id: "e691172598f04ea8881cd2a4adaa45ba"
 *   }
 * });
 * const versioningStates = await utils.createVersioningStates(webmap, false);
 */
export function createVersioningStates(input: WebMap | VersionAdapter[], usePersistentReadSessions: boolean): Promise<Collection<VersioningState>>;

/**
 * Used to get a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html) from a [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html)
 *
 * @param view - View used to get a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html).
 * @param usePersistentReadSessions - If set to `true`, the current version will have a read lock. Additionally, when switching versions, the new current version will also have a read lock.
 * @returns When resolved, a [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of [VersioningStates](https://developers.arcgis.com/javascript/latest/api-reference/esri-versionManagement-VersioningState.html) is returned.
 * @example
 * const webmap = new WebMap({
 *     portalItem: { // autocasts as new PortalItem()
 *     id: "e691172598f04ea8881cd2a4adaa45ba"
 *   }
 * });
 * const view = new View({
 *     map: webmap,
 *     container: "viewDiv",
 * });
 * const versioningStates = await utils.getVersioningStates(view, false);
 */
export function getVersioningStates(view: View, usePersistentReadSessions?: boolean): Promise<Collection<VersioningState>>;