import type Accessor from "../../core/Accessor.js";
import type { Icon } from "@esri/calcite-components/components/calcite-icon";
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";

export interface ActionBaseProperties extends IdentifiableMixinProperties, Partial<Pick<ActionBase, "active" | "className" | "disabled" | "icon" | "id" | "title" | "type" | "visible">> {}

/**
 * Actions are customizable behavior which can be executed in certain widgets such as [Popups](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/),
 * a [BasemapLayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/), or a [LayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/).
 *
 *  The `ActionBase` class is a read-only base class which has no constructor.
 *
 * @since 4.8
 * @see [ActionButton](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/)
 * @see [ActionToggle](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/)
 */
export default abstract class ActionBase extends ActionBaseSuperclass {
  /**
   * Set this property to `true` to display a spinner icon. You should do this
   * if the action executes an async operation, such as a query, that
   * requires letting the end user know that a process is ongoing in the background.
   * Set the property back to `false` to communicate to the user that the process has finished.
   *
   * @default false
   * @since 4.8
   */
  accessor active: boolean;
  /**
   * This adds a CSS class to the [ActionButton's](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/)
   * node. It can be used in conjunction with its  [ActionButton.image](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/#image)
   * property or by itself. Any icon font may be used in this property.
   * The [Esri Icon Font](https://developers.arcgis.com/javascript/latest/esri-icon-font/) is
   * automatically made available via the ArcGIS Maps SDK for JavaScript for you to
   * use in styling custom actions. To use one of these provided icon fonts, you must
   * prefix the class name with `esri-`. For example, the default `zoom-to` action in
   * [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) uses the font `esri-icon-zoom-in-magnifying-glass`.
   */
  accessor className: string | null | undefined;
  /**
   * Indicates whether this action is disabled.
   *
   * @default false
   * @since 4.8
   */
  accessor disabled: boolean;
  /**
   * Calcite icon used for the action.
   *
   * @since 4.27
   * @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
   * @example
   * // Create an action button to delete features
   * // using the 'trash' Calcite Icon.
   * const deleteAction = new ActionButton({
   *  id: "delete-feature",
   *  title: "Delete Feature",
   *  icon: "trash"
   * });
   */
  accessor icon: Icon["icon"] | null | undefined;
  /** The name of the ID assigned to this action. This is used for differentiating actions when listening to the [PopupViewModel.@trigger-action](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/PopupViewModel/#event-trigger-action)  event. */
  accessor id: string | null | undefined;
  /**
   * The title of the action.
   *
   * _For popups_: When space is limited, actions will display in the menu.
   * Text is always shown next to the icon but long text is truncated.
   * A tooltip with this title will display when hovering over it.
   *
   * _For LayerList_: The first action is displayed in the layerlist with an icon.
   * The layerlist has a menu that will display all actions with their titles.
   */
  accessor title: string | null | undefined;
  /** Specifies the type of action. Choose between ["button"](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or ["toggle"](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/). */
  accessor type: "button" | "slider" | "toggle" | null | undefined;
  /**
   * Indicates if the action is visible.
   *
   * @default true
   */
  accessor visible: boolean;
  /**
   * Creates a deep clone of this object.
   *
   * @returns A clone of the new [ActionBase](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionBase/) instance.
   */
  abstract clone(): this;
}
declare const ActionBaseSuperclass: typeof Accessor & typeof IdentifiableMixin