import { CanvasData, CanvasElementData } from "./types.js";
import { EFCanvas } from "../EFCanvas.js";

//#region src/canvas/api/CanvasAPI.d.ts

/**
 * Programmatic API/SDK for canvas operations.
 */
declare class CanvasAPI {
  private canvas;
  constructor(canvas: EFCanvas);
  /**
   * Register an existing element for canvas management.
   * @param element - The HTML element to register
   * @param id - Optional custom ID, otherwise auto-generated
   * @returns The element ID
   */
  registerElement(element: HTMLElement, id?: string): string;
  /**
   * Unregister an element from canvas management.
   * @param id - Element ID or element itself
   */
  unregisterElement(id: string | HTMLElement): void;
  /**
   * Update element position/transform in canvas coordinates.
   * @param id - Element ID
   * @param updates - Partial element data to update
   */
  updateElement(id: string, updates: Partial<CanvasElementData>): void;
  /**
   * Get element data by ID.
   * @param id - Element ID
   * @returns Element data or null if not found
   */
  getElement(id: string): CanvasElementData | null;
  /**
   * Get all registered elements.
   * @returns Array of all element data
   */
  getAllElements(): CanvasElementData[];
  /**
   * Get the number of registered elements.
   * @returns The count of registered elements
   */
  get elementCount(): number;
  /**
   * Get all registered elements (getter alias for getAllElements).
   * @returns Array of all element data
   */
  get elements(): CanvasElementData[];
  /**
   * Convert screen coordinates to canvas coordinates.
   * @param screenX - X coordinate in screen space
   * @param screenY - Y coordinate in screen space
   * @returns Canvas coordinates
   */
  screenToCanvas(screenX: number, screenY: number): {
    x: number;
    y: number;
  };
  /**
   * Convert canvas coordinates to screen coordinates.
   * @param canvasX - X coordinate in canvas space
   * @param canvasY - Y coordinate in canvas space
   * @returns Screen coordinates
   */
  canvasToScreen(canvasX: number, canvasY: number): {
    x: number;
    y: number;
  };
  /**
   * Select an element.
   * @param id - Element ID
   */
  select(id: string): void;
  /**
   * Select multiple elements.
   * @param ids - Array of element IDs
   */
  selectMultiple(ids: string[]): void;
  /**
   * Deselect an element.
   * @param id - Element ID
   */
  deselect(id: string): void;
  /**
   * Get currently selected element IDs.
   * @returns Set of selected IDs
   */
  getSelectedIds(): string[];
  /**
   * Create a group from element IDs.
   * @param ids - Array of element IDs to group
   * @returns Group ID
   */
  group(ids: string[]): string;
  /**
   * Ungroup a group.
   * @param groupId - Group ID
   */
  ungroup(groupId: string): void;
  /**
   * Export canvas data.
   * @returns Canvas data structure
   */
  export(): CanvasData;
  /**
   * Import canvas data.
   * @param data - Canvas data structure
   */
  import(data: CanvasData): void;
}
//#endregion
export { CanvasAPI };
//# sourceMappingURL=CanvasAPI.d.ts.map