import type Collection from "../../core/Collection.js";
import type ListItem from "../LayerList/ListItem.js";
import type { EventedAccessor, EventedMixinProperties } from "../../core/Evented.js";
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
import type { BasemapLayerListState } from "./types.js";
import type { LayerListViewModelEvents } from "../LayerList/LayerListViewModel.js";
import type { Action, ListItemModifier } from "../LayerList/types.js";

export interface BasemapLayerListViewModelProperties extends EventedMixinProperties, Partial<Pick<BasemapLayerListViewModel, "baseListItemCreatedFunction" | "basemapTitle" | "checkPublishStatusEnabled" | "listModeDisabled" | "referenceListItemCreatedFunction" | "view">> {}

export interface BasemapLayerListViewModelEvents extends LayerListViewModelEvents {}

/**
 * Provides logic for the [BasemapLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html) widget and [component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-layer-list/).
 *
 * @since 4.13
 * @see [BasemapLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html) widget
 * @see [Basemap Layer List component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-layer-list/)
 * @see [Programming patterns: Widget viewModel pattern](https://developers.arcgis.com/javascript/latest/programming-patterns/#widget-viewmodel-pattern)
 */
export default class BasemapLayerListViewModel extends EventedAccessor {
  constructor(properties?: BasemapLayerListViewModelProperties);
  /** A collection of [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html)s representing the [Basemap#baseLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers). */
  get baseItems(): Collection<ListItem>;
  /**
   * Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html).
   * Each list item can be modified
   * according to its modifiable properties. Actions can be added to list items
   * using the [ListItem#actionsSections](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#actionsSections).
   */
  accessor baseListItemCreatedFunction: ListItemModifier | null | undefined;
  /** The current basemap's title. */
  accessor basemapTitle: string | null | undefined;
  /**
   * Whether to provide an indication if a layer is being published in the
   * [BasemapLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html).
   * When a layer is publishing, a rotating square will appear to the right of the
   * list item title. The list item
   * [ListItem#publishing](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#publishing) property
   * will be `false` if `checkPublishStatusEnabled` is `false`.
   *
   * @default false
   * @since 4.25
   */
  accessor checkPublishStatusEnabled: boolean;
  /**
   * Specifies whether to ignore the [Layer#listMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode) property of the layers to display all layers.
   * A common use case for `listModeDisabled` is when you want to use the [BasemapLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html) to manage and configure a layer's `listMode` value.
   *
   * @default false
   * @since 4.30
   * @see [Layer#listMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#listMode)
   */
  accessor listModeDisabled: boolean;
  /** A collection of [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html)s representing the [Basemap#referenceLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers). */
  get referenceItems(): Collection<ListItem>;
  /** Specifies a function that accesses each [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html) representing reference layers. */
  accessor referenceListItemCreatedFunction: ListItemModifier | null | undefined;
  /**
   * The view model's state.
   *
   * @default "disabled"
   */
  get state(): BasemapLayerListState;
  /** A reference to the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). Set this to link the widget to a specific view. */
  accessor view: MapViewOrSceneView | null | undefined;
  /**
   * Triggers the [BasemapLayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#event-trigger-action) event and executes
   * the given [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [action toggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html).
   *
   * @param action - The action to execute.
   * @param item - An item associated with the action.
   */
  triggerAction(action: Action, item: ListItem): void;
}