/**
 * usePixelEditor — custom hook encapsulating ALL state, refs, callbacks,
 * side-effects and memos for the PixelEditor component.
 */
import { type BrushConfig, type SymmetryMode } from "./pixelEditorUtils";
import { type Tool, type Layer, type BlendMode, type Selection } from "./pixelEditorTypes";
export interface UsePixelEditorProps {
    initialWidth?: number;
    initialHeight?: number;
    onSaveToLibrary?: (dataUrl: string, name: string, mimeType: string) => void;
}
export interface PixelEditorAPI {
    dw: number;
    dh: number;
    layers: Layer[];
    aLi: number;
    setALi: React.Dispatch<React.SetStateAction<number>>;
    fc: number;
    afi: number;
    setAfi: React.Dispatch<React.SetStateAction<number>>;
    fDur: number[];
    tool: Tool;
    setTool: React.Dispatch<React.SetStateAction<Tool>>;
    col1: string;
    setCol1: React.Dispatch<React.SetStateAction<string>>;
    col2: string;
    setCol2: React.Dispatch<React.SetStateAction<string>>;
    brush: BrushConfig;
    setBrush: React.Dispatch<React.SetStateAction<BrushConfig>>;
    zoom: number;
    setZoom: React.Dispatch<React.SetStateAction<number>>;
    grid: boolean;
    setGrid: React.Dispatch<React.SetStateAction<boolean>>;
    onion: boolean;
    setOnion: React.Dispatch<React.SetStateAction<boolean>>;
    fps: number;
    setFps: React.Dispatch<React.SetStateAction<number>>;
    playing: boolean;
    setPlaying: React.Dispatch<React.SetStateAction<boolean>>;
    pal: string[];
    setPal: React.Dispatch<React.SetStateAction<string[]>>;
    cursor: {
        x: number;
        y: number;
    } | null;
    setCursor: React.Dispatch<React.SetStateAction<{
        x: number;
        y: number;
    } | null>>;
    dlgNew: boolean;
    setDlgNew: React.Dispatch<React.SetStateAction<boolean>>;
    nw: number;
    setNw: React.Dispatch<React.SetStateAction<number>>;
    nh: number;
    setNh: React.Dispatch<React.SetStateAction<number>>;
    sel: Selection | null;
    setSel: React.Dispatch<React.SetStateAction<Selection | null>>;
    symmetry: SymmetryMode;
    setSymmetry: React.Dispatch<React.SetStateAction<SymmetryMode>>;
    shapeFilled: boolean;
    setShapeFilled: React.Dispatch<React.SetStateAction<boolean>>;
    pressure: number;
    showHSV: boolean;
    setShowHSV: React.Dispatch<React.SetStateAction<boolean>>;
    editingLayerName: string | null;
    setEditingLayerName: React.Dispatch<React.SetStateAction<string | null>>;
    cvRef: React.RefObject<HTMLCanvasElement>;
    boxRef: React.RefObject<HTMLDivElement>;
    fInp: React.RefObject<HTMLInputElement>;
    clipboard: React.MutableRefObject<ImageData | null>;
    drawing: React.MutableRefObject<boolean>;
    panning: React.MutableRefObject<boolean>;
    undo: () => void;
    redo: () => void;
    openFile: (file: File) => Promise<void>;
    exportAse: () => Promise<void>;
    exportPNG: () => void;
    exportJPG: () => void;
    exportWebP: () => void;
    exportBMP: () => void;
    exportSVG: () => void;
    exportSheet: () => void;
    saveToLibrary: () => void;
    addLayer: () => void;
    rmLayer: () => void;
    toggleVis: (i: number) => void;
    toggleLock: (i: number) => void;
    setLayerOpacity: (i: number, op: number) => void;
    setLayerBlendMode: (i: number, mode: BlendMode) => void;
    renameLayer: (i: number, name: string) => void;
    moveLayerUp: () => void;
    moveLayerDown: () => void;
    mergeDown: () => void;
    dupLayer: () => void;
    addFrame: () => void;
    dupFrame: () => void;
    rmFrame: () => void;
    flipCv: (dir: "h" | "v") => void;
    rotateCv: () => void;
    clearCv: () => void;
    newDoc: (w: number, h: number) => void;
    doCopy: () => void;
    doCut: () => void;
    doPaste: () => void;
    doDeleteSel: () => void;
    doSelectAll: () => void;
    doDeselectAll: () => void;
    onDown: (e: React.PointerEvent<HTMLCanvasElement>) => void;
    onMove: (e: React.PointerEvent<HTMLCanvasElement>) => void;
    onUp: (e: React.PointerEvent<HTMLCanvasElement>) => void;
    onWheel: (e: React.WheelEvent) => void;
    thumbs: string[];
}
export declare function usePixelEditor({ initialWidth, initialHeight, onSaveToLibrary, }: UsePixelEditorProps): PixelEditorAPI;
