/**
 * usePhotoEditor.ts — Custom hook encapsulating all PhotoEditor state & logic.
 *
 * Extracts ~500 lines of state, effects, callbacks, and memoised values
 * out of the god-component so that the main component file is pure composition.
 */
import { type NiceTranslateFn } from "../core/i18n";
import { type AdjustmentValues, type FilterDefinition } from "./photoFilters";
import { type Overlay, type DrawingOverlay, createEmojiOverlay, createTextOverlay, createShapeOverlay, createFrameOverlay } from "./photoOverlays";
import { type PhotoEditorProps, type EditorTab, type FilterCategory } from "./photoEditorTypes";
export interface PhotoEditorAPI {
    t: NiceTranslateFn;
    playerColor: string;
    onCancel: () => void;
    accent: string;
    accentDim: string;
    image: HTMLImageElement | null;
    loading: boolean;
    activeTab: EditorTab;
    setActiveTab: (tab: EditorTab) => void;
    setCropMode: (v: boolean) => void;
    selectedFilter: string;
    setSelectedFilter: (f: string) => void;
    filterIntensity: number;
    setFilterIntensity: (v: number) => void;
    filterCategory: FilterCategory;
    setFilterCategory: (c: FilterCategory) => void;
    filteredList: FilterDefinition[];
    generateThumbnail: (canvas: HTMLCanvasElement, filter: FilterDefinition) => void;
    adjustments: AdjustmentValues;
    handleAdjChange: (key: keyof AdjustmentValues, value: number) => void;
    handleAdjChangeEnd: () => void;
    rotation: number;
    setRotation: (v: number) => void;
    flipH: boolean;
    setFlipH: (v: boolean) => void;
    flipV: boolean;
    setFlipV: (v: boolean) => void;
    zoom: number;
    setZoom: (v: number) => void;
    cropMode: boolean;
    cropRect: {
        x: number;
        y: number;
        w: number;
        h: number;
    } | null;
    setCropRect: (r: {
        x: number;
        y: number;
        w: number;
        h: number;
    } | null) => void;
    cropAspect: number | null;
    setCropAspect: (v: number | null) => void;
    handleCropMouseDown: (e: React.MouseEvent, handle: string) => void;
    showCompare: boolean;
    setShowCompare: (v: boolean) => void;
    comparePosition: number;
    setCompareDragging: (v: boolean) => void;
    overlays: Overlay[];
    setOverlays: React.Dispatch<React.SetStateAction<Overlay[]>>;
    selectedOverlayId: string | null;
    setSelectedOverlayId: (id: string | null) => void;
    selectedOverlay: Overlay | null;
    addOverlay: (ov: Overlay) => void;
    updateOverlay: (id: string, patch: Partial<Overlay>) => void;
    deleteOverlay: (id: string) => void;
    moveOverlayForward: (id: string) => void;
    moveOverlayBack: (id: string) => void;
    emojiCat: string;
    setEmojiCat: (id: string) => void;
    textDraft: string;
    setTextDraft: (v: string) => void;
    textColor: string;
    setTextColor: (v: string) => void;
    textBold: boolean;
    setTextBold: (v: boolean) => void;
    textItalic: boolean;
    setTextItalic: (v: boolean) => void;
    textOutline: boolean;
    setTextOutline: (v: boolean) => void;
    textFontSize: number;
    setTextFontSize: (v: number) => void;
    textBg: boolean;
    setTextBg: (v: boolean) => void;
    shapeStroke: string;
    setShapeStroke: (v: string) => void;
    shapeFill: string;
    setShapeFill: (v: string) => void;
    shapeStrokeW: number;
    setShapeStrokeW: (v: number) => void;
    frameColor: string;
    setFrameColor: (v: string) => void;
    frameThick: number;
    setFrameThick: (v: number) => void;
    drawColor: string;
    setDrawColor: (v: string) => void;
    drawWidth: number;
    setDrawWidth: (v: number) => void;
    drawingOverlayRef: React.MutableRefObject<DrawingOverlay | null>;
    historyIdx: number;
    historyLength: number;
    undo: () => void;
    redo: () => void;
    pushHistory: () => void;
    handleSave: () => Promise<void>;
    handleReset: () => void;
    handleDownload: () => Promise<void>;
    handleCopyToClipboard: () => Promise<void>;
    handleShareNative: () => Promise<void>;
    mainCanvasRef: React.RefObject<HTMLCanvasElement>;
    compareCanvasRef: React.RefObject<HTMLCanvasElement>;
    containerRef: React.RefObject<HTMLDivElement>;
    handleCanvasMouseDown: (e: React.MouseEvent) => void;
    handleCanvasMouseMove: (e: React.MouseEvent) => void;
    handleCanvasMouseUp: () => void;
    createEmojiOverlay: typeof createEmojiOverlay;
    createTextOverlay: typeof createTextOverlay;
    createShapeOverlay: typeof createShapeOverlay;
    createFrameOverlay: typeof createFrameOverlay;
}
export declare function usePhotoEditor({ src, playerColor, onSave, onCancel, initialState }: PhotoEditorProps): PhotoEditorAPI;
