import * as react from 'react';
import { c as SceneDocument } from './model-BBwyOuWG.js';
import { D as DesignCanvasProps, c as createSceneCommandStack, E as ExportTriggerOptions } from './command-stack-CcWi_2bN.js';

/** Callers inject a workspace renderer so this chrome stays Konva-free. The
 *  workspace occupies the scrollable area between the rulers and the bottom bar. */
interface DesignCanvasFullProps extends DesignCanvasProps {
    /**
     * Render the Konva canvas workspace into the slot this shell provides.
     * The shell passes viewport dimensions, view-state, and the shared command
     * stack so `WorkspaceView` can commit gestures through the same stack the
     * chrome uses for undo/redo and layers-panel selection.
     *
     * `onFitRef` is a ref the workspace fills with a fit-page callback; the
     * shell calls it when the user presses F or clicks the Fit button.
     */
    renderWorkspace(ctx: {
        document: SceneDocument;
        activePageId: string;
        selectedElementIds: string[];
        zoom: number;
        panX: number;
        panY: number;
        gridEnabled: boolean;
        gridSize: number;
        snapEnabled: boolean;
        showBleed: boolean;
        canWrite: boolean;
        /** The chrome's command stack. Pass to WorkspaceView so gestures, undo,
         *  and layers-panel selection share a single state machine. */
        stack: ReturnType<typeof createSceneCommandStack>;
        activePage: SceneDocument['pages'][number] | undefined;
        onFitRef: React.MutableRefObject<(() => void) | null>;
        /** A ref the workspace fills with an export callback. The chrome's Export
         *  control calls it with the chosen format/scale; the workspace renders the
         *  Konva stage to a data URL and forwards the result to `onExport`. Filled
         *  only when `onExport` is wired (the workspace skips it otherwise). */
        onExportRef: React.MutableRefObject<((opts: ExportTriggerOptions) => void) | null>;
        /** Forwarded from DesignCanvasProps. Default true: WorkspaceView fits the
         *  active page to the viewport once, on the first non-zero measurement. */
        fitOnMount?: boolean;
        /** Forwarded from DesignCanvasProps. Fires once after the first real
         *  measurement, after the initial fit is applied (or skipped). */
        onReady?(): void;
        /** Forwarded from DesignCanvasProps. The Konva render palette; the
         *  Konva-free chrome passes it straight through to the workspace. */
        render?: DesignCanvasProps['render'];
        /** Forwarded from DesignCanvasProps. Toggles the branded in-canvas empty
         *  state and its agent door. */
        showEmptyState?: DesignCanvasProps['showEmptyState'];
        onAskAgent?: DesignCanvasProps['onAskAgent'];
        onZoomChange(zoom: number): void;
        onPanChange(panX: number, panY: number): void;
        onSelectElements(ids: string[], additive: boolean): void;
    }): React.ReactNode;
    /**
     * Generates page thumbnails for the PagesStrip. Injected by the integrator
     * (who has Konva access) so the chrome doesn't import Konva directly.
     */
    renderThumbnail(page: SceneDocument['pages'][number]): Promise<string | null>;
}
declare function DesignCanvas({ document: initialDocument, rev: initialRev, canWrite, mode, onApplyOperations, onSelectionChange, renderAgentPanel, renderSidePanel, onExport, exportDefaults, className, fitOnMount, onReady, render, showEmptyState, onAskAgent, pageSizeLabel, enableBleedLabel, fitLabel, renderWorkspace, renderThumbnail, }: DesignCanvasFullProps): react.JSX.Element;

/**
 * Mount this component to get the full editor: toolbar, rulers, layers panel,
 * pages strip, zoom controls, and the Konva canvas — all sharing one command
 * stack so undo/redo and selection are coherent across every surface.
 */
declare function DesignCanvasEditor(props: DesignCanvasProps): react.JSX.Element;

/** Batteries-included editor: chrome + workspace on one shared stack. */
declare const DesignCanvasLazy: react.LazyExoticComponent<typeof DesignCanvasEditor>;
/** Raw chrome only — use when supplying a custom renderWorkspace/renderThumbnail. */
declare const DesignCanvasChromeLazy: react.LazyExoticComponent<typeof DesignCanvas>;

export { DesignCanvas as D, DesignCanvasChromeLazy as a, DesignCanvasEditor as b, type DesignCanvasFullProps as c, DesignCanvasLazy as d };
