/**
 * Isometric Tile System
 * Support for 2.5D isometric/dimetric tile rendering and editing
 */
export type IsometricProjection = 'isometric' | 'dimetric' | 'trimetric' | 'military' | 'cavalier';
export interface IsometricConfig {
    /** Projection type */
    projection: IsometricProjection;
    /** Tile width in pixels */
    tileWidth: number;
    /** Tile height in pixels (visible portion) */
    tileHeight: number;
    /** Tile depth (for 3D tiles) */
    tileDepth: number;
    /** Angle in degrees (for custom projections) */
    angle: number;
    /** Scale factor */
    scale: number;
    /** Origin offset */
    origin: {
        x: number;
        y: number;
    };
    /** Grid size (columns x rows) */
    gridSize: {
        cols: number;
        rows: number;
    };
    /** Stacking layers */
    layers: number;
}
export interface IsometricTile {
    /** Unique ID */
    id: string;
    /** Grid position */
    gridX: number;
    gridY: number;
    /** Layer (z-level) */
    layer: number;
    /** Tile type/sprite index */
    tileType: number;
    /** Rotation (0, 90, 180, 270) */
    rotation: 0 | 90 | 180 | 270;
    /** Flip horizontally */
    flipX: boolean;
    /** Flip vertically */
    flipY: boolean;
    /** Custom height offset */
    heightOffset: number;
    /** Tile metadata */
    metadata?: Record<string, unknown>;
}
export interface IsometricTileset {
    /** Tileset name */
    name: string;
    /** Source image path */
    imagePath: string;
    /** Tile definitions */
    tiles: IsometricTileDefinition[];
    /** Tileset dimensions */
    imageWidth: number;
    imageHeight: number;
}
export interface IsometricTileDefinition {
    /** Tile ID */
    id: number;
    /** Name */
    name: string;
    /** Region in source image */
    region: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    /** Tile footprint (for larger tiles) */
    footprint: {
        cols: number;
        rows: number;
    };
    /** Height in layers */
    height: number;
    /** Anchor point (for positioning) */
    anchor: {
        x: number;
        y: number;
    };
    /** Collision type */
    collision: 'none' | 'solid' | 'half' | 'ramp-n' | 'ramp-s' | 'ramp-e' | 'ramp-w';
    /** Tags for filtering */
    tags: string[];
}
export interface IsometricMap {
    /** Map name */
    name: string;
    /** Grid dimensions */
    width: number;
    height: number;
    /** Number of layers */
    layers: number;
    /** Tile data */
    tiles: IsometricTile[];
    /** Tileset references */
    tilesets: string[];
    /** Map properties */
    properties: Record<string, unknown>;
}
export interface ScreenPosition {
    x: number;
    y: number;
}
export interface GridPosition {
    col: number;
    row: number;
    layer: number;
}
/**
 * Get projection angles for different isometric types
 */
export declare function getProjectionAngles(projection: IsometricProjection): {
    x: number;
    y: number;
};
/**
 * Convert grid coordinates to screen coordinates
 */
export declare function gridToScreen(gridX: number, gridY: number, layer: number, config: IsometricConfig): ScreenPosition;
/**
 * Convert screen coordinates to grid coordinates
 */
export declare function screenToGrid(screenX: number, screenY: number, layer: number, config: IsometricConfig): GridPosition;
/**
 * Get tile corners in screen space
 */
export declare function getTileCorners(gridX: number, gridY: number, layer: number, config: IsometricConfig): ScreenPosition[];
/**
 * Get 3D tile vertices (for cubes/blocks)
 */
export declare function getTile3DVertices(gridX: number, gridY: number, layer: number, height: number, config: IsometricConfig): {
    top: ScreenPosition[];
    left: ScreenPosition[];
    right: ScreenPosition[];
};
/**
 * Sort tiles for correct rendering order (painter's algorithm)
 */
export declare function sortTilesForRendering(tiles: IsometricTile[]): IsometricTile[];
/**
 * Get visible tiles within viewport
 */
export declare function getVisibleTiles(tiles: IsometricTile[], viewport: {
    x: number;
    y: number;
    width: number;
    height: number;
}, config: IsometricConfig): IsometricTile[];
/**
 * Render isometric grid to canvas
 */
export declare function renderIsometricGrid(ctx: CanvasRenderingContext2D, config: IsometricConfig, options?: {
    gridColor?: string;
    gridOpacity?: number;
    showCoordinates?: boolean;
}): void;
/**
 * Render a single isometric tile
 */
export declare function renderIsometricTile(ctx: CanvasRenderingContext2D, tile: IsometricTile, tileset: IsometricTileset, tileImage: HTMLImageElement, config: IsometricConfig): void;
/**
 * Render 3D block (cube) at position
 */
export declare function renderIsometricBlock(ctx: CanvasRenderingContext2D, gridX: number, gridY: number, layer: number, height: number, colors: {
    top: string;
    left: string;
    right: string;
}, config: IsometricConfig): void;
/**
 * Create a new isometric map
 */
export declare function createIsometricMap(name: string, width: number, height: number, layers?: number): IsometricMap;
/**
 * Add a tile to the map
 */
export declare function addTile(map: IsometricMap, tile: Omit<IsometricTile, 'id'>): IsometricMap;
/**
 * Remove a tile from the map
 */
export declare function removeTile(map: IsometricMap, tileId: string): IsometricMap;
/**
 * Get tile at position
 */
export declare function getTileAt(map: IsometricMap, gridX: number, gridY: number, layer: number): IsometricTile | undefined;
/**
 * Get all tiles at position (all layers)
 */
export declare function getTilesAt(map: IsometricMap, gridX: number, gridY: number): IsometricTile[];
/**
 * Fill a region with tiles
 */
export declare function fillRegion(map: IsometricMap, startX: number, startY: number, endX: number, endY: number, layer: number, tileType: number): IsometricMap;
/**
 * Export to Tiled TMX format (isometric)
 */
export declare function exportToTiledIsometric(map: IsometricMap, configOrTileset?: IsometricConfig | IsometricTileset, configArg?: IsometricConfig): string;
/**
 * Export to Godot isometric tilemap
 */
export declare function exportToGodotIsometric(map: IsometricMap, configOrTileset?: IsometricConfig | IsometricTileset, configArg?: IsometricConfig): string;
export interface UseIsometricEditorOptions {
    /** Initial configuration */
    config?: Partial<IsometricConfig>;
    /** Initial map */
    initialMap?: IsometricMap;
}
export interface UseIsometricEditorReturn {
    /** Current configuration */
    config: IsometricConfig;
    /** Current map */
    map: IsometricMap;
    /** Update configuration */
    setConfig: (config: Partial<IsometricConfig>) => void;
    /** Set selected tile type */
    setSelectedTile: (tileType: number) => void;
    /** Selected tile type */
    selectedTile: number;
    /** Current layer */
    currentLayer: number;
    /** Set current layer */
    setCurrentLayer: (layer: number) => void;
    /** Place tile at grid position */
    placeTile: (gridX: number, gridY: number) => void;
    /** Remove tile at grid position */
    eraseTile: (gridX: number, gridY: number) => void;
    /** Fill region */
    fill: (startX: number, startY: number, endX: number, endY: number) => void;
    /** Convert screen to grid */
    screenToGrid: (screenX: number, screenY: number) => GridPosition;
    /** Undo last action */
    undo: () => void;
    /** Redo last undone action */
    redo: () => void;
    /** Can undo */
    canUndo: boolean;
    /** Can redo */
    canRedo: boolean;
    /** Clear map */
    clear: () => void;
}
export declare function useIsometricEditor(options?: UseIsometricEditorOptions): UseIsometricEditorReturn;
export default useIsometricEditor;
