/// <reference path="../../index.d.ts" />
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { Scale } from "../interfaces.js";
import type { BlockDragDetail } from "./interfaces.js";

/** @slot  - A slot for adding `calcite-block` elements. */
export abstract class BlockGroup extends LitElement {
  /** When provided, the method will be called to determine whether the element can move from the component. */
  accessor canPull: (detail: BlockDragDetail) => boolean | "clone";
  /** When provided, the method will be called to determine whether the element can be added from another component. */
  accessor canPut: (detail: BlockDragDetail) => boolean;
  /**
   * When `true`, interaction is prevented and the component is displayed with lower opacity.
   *
   * @default false
   */
  accessor disabled: boolean;
  /**
   * When `true`, `calcite-block`s are sortable via a draggable button.
   *
   * @default false
   */
  accessor dragEnabled: boolean;
  /**
   * Specifies the component's group identifier.
   *
   * To drag elements from one group into another, both groups must have the same group value.
   */
  accessor group: string | undefined;
  /**
   * Specifies an accessible label for the component.
   *
   * When `dragEnabled` is `true` and multiple group sorting is enabled with `group`, specifies the component's name for dragging between groups.
   *
   * @required
   */
  accessor label: string;
  /**
   * When `true`, a busy indicator is displayed.
   *
   * @default false
   */
  accessor loading: boolean;
  /**
   * Specifies the size of the component.
   *
   * @default "m"
   */
  accessor scale: Scale;
  /**
   * When `true`, and a `group` is defined, `calcite-block`s are no longer sortable.
   *
   * @default false
   */
  accessor sortDisabled: boolean;
  /**
   * Sets focus on the component's first focusable element.
   *
   * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
   * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
   */
  setFocus(options?: FocusOptions): Promise<void>;
  /** Fires when the component's dragging has ended. */
  readonly calciteBlockGroupDragEnd: import("@arcgis/lumina").TargetedEvent<this, BlockDragDetail>;
  /** Fires when the component's dragging has started. */
  readonly calciteBlockGroupDragStart: import("@arcgis/lumina").TargetedEvent<this, BlockDragDetail>;
  /**
   * Fires when a user attempts to move an element using the sort menu and 'canPut' or 'canPull' returns falsy.
   *
   * @deprecated in v3.3.0, removal target v6.0.0 - No longer necessary.
   */
  readonly calciteBlockGroupMoveHalt: import("@arcgis/lumina").TargetedEvent<this, BlockDragDetail>;
  /** Fires when the component's item order changes. */
  readonly calciteBlockGroupOrderChange: import("@arcgis/lumina").TargetedEvent<this, BlockDragDetail>;
  readonly "@eventTypes": {
    calciteBlockGroupDragEnd: BlockGroup["calciteBlockGroupDragEnd"]["detail"];
    calciteBlockGroupDragStart: BlockGroup["calciteBlockGroupDragStart"]["detail"];
    calciteBlockGroupMoveHalt: BlockGroup["calciteBlockGroupMoveHalt"]["detail"];
    calciteBlockGroupOrderChange: BlockGroup["calciteBlockGroupOrderChange"]["detail"];
  };
}