import { PanZoomTransform } from "../elements/EFPanZoom.js";
import { EFOverlayItem } from "./EFOverlayItem.js";
import * as lit31 from "lit";
import { LitElement } from "lit";
import * as lit_html29 from "lit-html";

//#region src/gui/EFOverlayLayer.d.ts

/**
 * Overlay layer container component.
 *
 * SIMPLE ARCHITECTURE:
 * - Runs a SINGLE RAF loop that updates everything every frame
 * - No change detection, no optimization, no delays
 * - Just: read transform → apply it → update all items → next frame
 *
 * Core responsibilities:
 * - Consumes PanZoom transform from context (if PanZoom is ancestor)
 * - Accepts transform via props as fallback (for sibling PanZoom)
 * - Applies translate-only transform (no scale) directly to host element
 * - Manages registered child EFOverlayItem components
 * - Updates all overlays every animation frame
 *
 * The transform is applied directly to the host element so that:
 * 1. getBoundingClientRect() returns the transformed position
 * 2. EFOverlayItem can use this rect for coordinate calculations
 */
declare class EFOverlayLayer extends LitElement {
  static styles: lit31.CSSResult[];
  panZoomTransformFromContext?: PanZoomTransform;
  /**
   * Pan/zoom transform as fallback for when context or sibling PanZoom is not available.
   * Primarily used for testing and standalone usage.
   */
  panZoomTransform?: PanZoomTransform;
  private registeredItems;
  private rafId;
  /**
   * Register an overlay item for coordinated updates.
   * Called by EFOverlayItem in connectedCallback.
   */
  registerOverlayItem(item: EFOverlayItem): void;
  /**
   * Unregister an overlay item.
   * Called by EFOverlayItem in disconnectedCallback.
   */
  unregisterOverlayItem(item: EFOverlayItem): void;
  /**
   * Single source of truth for reading the current transform.
   * Priority: context > sibling DOM read > prop > default
   */
  private readTransform;
  /**
   * Simple RAF loop: Update everything on every frame.
   */
  private startLoop;
  private stopLoop;
  connectedCallback(): void;
  disconnectedCallback(): void;
  updated(): void;
  render(): lit_html29.TemplateResult<1>;
}
declare global {
  interface HTMLElementTagNameMap {
    "ef-overlay-layer": EFOverlayLayer;
  }
}
//#endregion
export { EFOverlayLayer };
//# sourceMappingURL=EFOverlayLayer.d.ts.map