import type ActionBase from "./ActionBase.js";
import type { ActionBaseProperties } from "./ActionBase.js";

export interface ActionButtonProperties extends ActionBaseProperties, Partial<Pick<ActionButton, "image">> {}

/**
 * A customizable button that performs a specific action(s) used
 * in widgets such as the [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/),
 * [LayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/), and
 * [BasemapLayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/).
 *
 * @since 4.8
 * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
 * @see [Sample - Custom popup actions per feature](https://developers.arcgis.com/javascript/latest/sample-code/popup-custom-action/)
 */
export default class ActionButton extends ActionBase {
  constructor(properties?: ActionButtonProperties);
  /**
   * The URL to an image that will be used to represent the action.
   * This property will be used as a background image for the node.
   * It may be used in conjunction with the `className` property or by itself.
   * If neither `image` nor `className` are specified, a default icon
   * ![default icon](https://developers.arcgis.com/javascript/latest/assets/images/guide/whats-new/41/default-action.png) will display.
   */
  accessor image: string | null | undefined;
  /**
   * Specifies the type of action.
   *
   * @default "button"
   */
  get type(): "button";
  /**
   * Creates a deep clone of this object.
   *
   * @returns A clone of the new [ActionButton](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) instance.
   */
  clone(): this;
}