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

/** @slot  - A slot for adding focus-trapped content. */
export abstract class FocusTrap extends LitElement {
  /**
   * Indicates whether the component's focus trap is currently active.
   *
   * @default false
   */
  get active(): boolean;
  /**
   * When `true`, prevents focus trapping.
   *
   * @default false
   */
  accessor focusTrapDisabled: boolean;
  /** When defined, provides a condition to disable focus trapping. When `true`, prevents focus trapping. */
  accessor focusTrapDisabledOverride: (() => boolean) | undefined;
  /**
   * Specifies custom focus trap configuration on the component, where
   *
   * `"allowOutsideClick"` allows outside clicks,
   * `"initialFocus"` enables initial focus,
   * `"returnFocusOnDeactivate"` returns focus when not active,
   * `"extraContainers"` specifies additional focusable elements external to the trap, and
   * `"setReturnFocus"` customizes the element to which focus is returned when the trap is deactivated.
   */
  accessor focusTrapOptions: Partial<FocusTrapOptions> | undefined;
  /** Activates the component's focus trap. */
  activate(): Promise<void>;
  /** Deactivates the component's focus trap. */
  deactivate(): Promise<void>;
  /**
   * 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.
   * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
   */
  setFocus(options?: FocusOptions): Promise<void>;
  /**
   * Updates the element(s) that are included in the focus-trap of the component.
   *
   * @param extraContainers - Additional elements to include in the focus trap. This is useful for including elements that may have related parts rendered outside the main focus trapping element.
   */
  updateFocusTrapElements(extraContainers?: FocusTrapOptions["extraContainers"]): Promise<void>;
  /** Fires when the focus-trap active state has changed. */
  readonly calciteFocusTrapActiveChange: import("@arcgis/lumina").TargetedEvent<this, void>;
  readonly "@eventTypes": {
    calciteFocusTrapActiveChange: FocusTrap["calciteFocusTrapActiveChange"]["detail"];
  };
}