import { SelectionContext } from "../selection/selectionContext.js";
import { PanZoomTransform } from "../../elements/EFPanZoom.js";
import * as lit37 from "lit";
import { LitElement } from "lit";
import * as lit_html34 from "lit-html";

//#region src/canvas/overlays/SelectionOverlay.d.ts
/**
 * Selection overlay that renders unscaled selection indicators.
 * Uses fixed positioning to ensure 1:1 pixel ratio regardless of zoom level.
 */
declare class SelectionOverlay extends LitElement {
  static styles: lit37.CSSResult[];
  createRenderRoot(): this;
  firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
  selectionFromContext?: SelectionContext;
  panZoomTransformFromContext?: PanZoomTransform;
  /**
   * Selection context as fallback for when overlay is outside context providers (e.g., sibling of pan-zoom).
   */
  selection?: SelectionContext;
  /**
   * Pan/zoom transform as fallback for when overlay is outside context providers (e.g., sibling of pan-zoom).
   */
  panZoomTransform?: PanZoomTransform;
  private canvasElement;
  /**
   * Canvas element property - can be set directly when overlay is outside context providers.
   */
  canvas?: HTMLElement;
  /**
   * Complete overlay state - calculated from targets using the abstraction layer.
   * This is the SINGLE source of truth for overlay bounds.
   */
  private overlayState;
  private lastSelectionMode;
  /**
   * When true, the RAF loop skips all work. Used during playback to avoid
   * layout-thrashing getBoundingClientRect/getComputedStyle calls that
   * compete with the canvas render pipeline.
   */
  paused: boolean;
  private animationFrame?;
  private rafLoopActive;
  connectedCallback(): void;
  disconnectedCallback(): void;
  /**
   * React to selection context changes to ensure box selection visual updates.
   * This is called whenever Lit detects a property change, including context updates.
   * Note: We don't call requestUpdate() here to avoid the Lit warning about scheduling
   * updates after an update completes. The RAF loop handles all updates.
   */
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
  /**
   * Find the EFCanvas element.
   * Handles both cases:
   * 1. Overlay is inside EFCanvas's shadow DOM (old case)
   * 2. Overlay is a sibling of ef-pan-zoom (new case - outside transform)
   */
  private findCanvasElement;
  /**
   * Start continuous RAF loop for smooth overlay updates.
   */
  private startRafLoop;
  /**
   * Stop RAF loop.
   */
  private stopRafLoop;
  /**
   * Continuous RAF loop to update overlays every frame using Lit render cycle.
   * When paused, the loop keeps running (for quick resume) but skips all
   * expensive layout queries.
   */
  private rafLoop;
  /**
   * Get the effective selection context (from context or property).
   */
  private get effectiveSelection();
  /**
   * Get the effective pan-zoom transform (from context or property).
   */
  private get effectivePanZoomTransform();
  /**
   * Update overlay data state using the abstraction layer.
   *
   * This method now uses the clean separation of:
   * - SEMANTICS: getOverlayTargets() determines WHAT should be shown
   * - MECHANISM: calculateOverlayState() determines HOW to show it
   */
  private updateOverlayData;
  /**
   * Read current transform directly from panzoom element.
   * This ensures we always have fresh values instead of stale property/context.
   */
  private readCurrentTransform;
  render(): lit_html34.TemplateResult<1>;
}
declare global {
  interface HTMLElementTagNameMap {
    "ef-canvas-selection-overlay": SelectionOverlay;
  }
}
//# sourceMappingURL=SelectionOverlay.d.ts.map