import { PanZoomTransform } from "../elements/EFPanZoom.js";
import * as lit25 from "lit";
import { LitElement } from "lit";
import * as lit_html23 from "lit-html";

//#region src/gui/EFTransformHandles.d.ts
interface TransformBounds {
  x: number;
  y: number;
  width: number;
  height: number;
  rotation?: number;
}
/**
 * Interaction mode enumeration.
 * Only one mode can be active at a time (invariant).
 */
type InteractionMode = "idle" | "dragging" | "resizing" | "rotating";
declare class EFTransformHandles extends LitElement {
  bounds: TransformBounds;
  minSize: number;
  target?: string;
  panZoomTransformFromContext?: PanZoomTransform;
  canvasScale: number;
  enableRotation: boolean;
  enableResize: boolean;
  cornersOnly: boolean;
  lockAspectRatio: boolean;
  enableDrag: boolean;
  rotationStep?: number;
  /**
   * Current interaction mode.
   * Invariant: Only one mode active at a time.
   */
  interactionMode: InteractionMode;
  /**
   * Active resize handle when in "resizing" mode.
   * Only valid when interactionMode === "resizing".
   */
  private activeResizeHandle;
  /**
   * Mouse start position for calculating deltas.
   * Only valid during active interaction.
   */
  private mouseStart;
  /**
   * Initial bounds at interaction start - NEVER mutated during interaction.
   * All calculations derive from this + mouse deltas.
   * Note: Not a @state() property to avoid re-renders during interaction.
   */
  private initialBounds;
  static styles: lit25.CSSResult;
  private resizeObserver?;
  /**
   * Single source of truth for zoom scale.
   * Priority: context > prop > 1.0
   */
  private getZoomScale;
  /**
   * Convert screen pixel bounds to canvas coordinates.
   */
  private screenToCanvas;
  connectedCallback(): void;
  disconnectedCallback(): void;
  /**
   * Transition interaction mode state machine.
   * Ensures only one mode is active at a time (invariant).
   */
  private transitionInteractionMode;
  private handleMouseDown;
  private handleResizeMouseDown;
  private handleRotateMouseDown;
  /**
   * Dispatch bounds change event (one-way data flow).
   * Parent updates element, then reads element and updates handle bounds prop.
   * We don't modify this.bounds directly - always render from prop.
   */
  private dispatchBoundsChange;
  private handleMouseMove;
  private handleMouseUp;
  private cleanup;
  render(): lit_html23.TemplateResult<1>;
}
declare global {
  interface HTMLElementTagNameMap {
    "ef-transform-handles": EFTransformHandles;
  }
}
//#endregion
export { EFTransformHandles, TransformBounds };
//# sourceMappingURL=EFTransformHandles.d.ts.map