/**
 * tileMapMode — Tile map editing mode for PixelEditor
 *
 * Features:
 * - Repeat pattern (tile seamless preview)
 * - Mirror modes (horizontal, vertical, both)
 * - Tile grid overlay
 * - Tile offset/wrapping
 * - Seamless tile generation
 * - Auto-tile detection
 */
export type TileMirrorMode = 'none' | 'horizontal' | 'vertical' | 'both';
export type TileRepeatPattern = 'none' | 'repeat' | 'repeat-x' | 'repeat-y' | 'mirror-repeat' | 'brick' | 'hexagonal';
export interface TileMapSettings {
    /** Whether tile map mode is enabled */
    enabled: boolean;
    /** Mirror mode for editing */
    mirrorMode: TileMirrorMode;
    /** Repeat pattern for preview */
    repeatPattern: TileRepeatPattern;
    /** Number of tiles to show in preview (width) */
    repeatCountX: number;
    /** Number of tiles to show in preview (height) */
    repeatCountY: number;
    /** Brick offset (0-1, only for brick pattern) */
    brickOffset: number;
    /** Show tile grid */
    showGrid: boolean;
    /** Grid color */
    gridColor: string;
    /** Grid opacity (0-1) */
    gridOpacity: number;
    /** Wrap editing across tile boundaries */
    wrapEditing: boolean;
    /** Show seam warning markers */
    showSeamWarnings: boolean;
}
export interface TileMapState {
    settings: TileMapSettings;
    /** Offset for scrolling the tile preview */
    previewOffsetX: number;
    previewOffsetY: number;
    /** Zoom level for tile preview */
    previewZoom: number;
}
export declare const DEFAULT_TILE_MAP_SETTINGS: TileMapSettings;
/**
 * Apply mirror transformation to coordinates
 */
export declare function applyMirror(x: number, y: number, width: number, height: number, mode: TileMirrorMode): {
    x: number;
    y: number;
}[];
/**
 * Wrap coordinates to tile boundaries
 */
export declare function wrapCoordinates(x: number, y: number, width: number, height: number): {
    x: number;
    y: number;
};
/**
 * Get all affected coordinates for a draw operation
 */
export declare function getAffectedCoordinates(x: number, y: number, width: number, height: number, settings: TileMapSettings): {
    x: number;
    y: number;
}[];
/**
 * Render tile pattern to a canvas for preview
 */
export declare function renderTilePattern(source: HTMLCanvasElement | ImageData, settings: TileMapSettings, targetWidth: number, targetHeight: number): HTMLCanvasElement;
/**
 * Analyze tile for seam issues (discontinuities at edges)
 */
export declare function analyzeSeams(imageData: ImageData, threshold?: number): {
    top: number[];
    right: number[];
    bottom: number[];
    left: number[];
    score: number;
};
/**
 * Make tile seamless using offset blend technique
 */
export declare function makeSeamless(imageData: ImageData, blendWidth?: number): ImageData;
export interface UseTileMapModeOptions {
    /** Initial settings */
    initialSettings?: Partial<TileMapSettings>;
    /** Tile width */
    tileWidth: number;
    /** Tile height */
    tileHeight: number;
    /** Called when settings change */
    onSettingsChange?: (settings: TileMapSettings) => void;
}
export interface UseTileMapModeReturn {
    /** Current settings */
    settings: TileMapSettings;
    /** Update settings */
    updateSettings: (partial: Partial<TileMapSettings>) => void;
    /** Toggle tile map mode */
    toggle: () => void;
    /** Set mirror mode */
    setMirrorMode: (mode: TileMirrorMode) => void;
    /** Set repeat pattern */
    setRepeatPattern: (pattern: TileRepeatPattern) => void;
    /** Get affected coordinates for a draw operation */
    getDrawCoordinates: (x: number, y: number) => {
        x: number;
        y: number;
    }[];
    /** Render tile preview */
    renderPreview: (source: HTMLCanvasElement | ImageData, width: number, height: number) => HTMLCanvasElement;
    /** Analyze seams */
    analyzeSeams: (imageData: ImageData) => ReturnType<typeof analyzeSeams>;
    /** Make tile seamless */
    makeSeamless: (imageData: ImageData) => ImageData;
    /** Reset to defaults */
    reset: () => void;
}
export declare function useTileMapMode(options: UseTileMapModeOptions): UseTileMapModeReturn;
export default useTileMapMode;
