import { DrawingBlock, VectorShapeDrawing, ShapeGroupDrawing } from '../../../../../../../layout-engine/contracts/src/index.js';
import { PMNode, NodeHandlerContext, BlockIdGenerator, PositionMap } from '../types.js';
import { EffectExtent, LineEnds } from '../utilities.js';
type ShapeDrawingBlock = VectorShapeDrawing | ShapeGroupDrawing;
type ShapeDrawingGeometry = ShapeDrawingBlock['geometry'];
/**
 * Build a DrawingBlock from normalized shape attributes
 *
 * This helper eliminates code duplication across all shape converters by
 * centralizing the common DrawingBlock construction logic.
 *
 * @param rawAttrs - Extracted and normalized attributes
 * @param nextBlockId - Block ID generator
 * @param positions - Position map for PM node tracking
 * @param node - Original PM node
 * @param geometry - Calculated geometry configuration
 * @param drawingKind - Type of drawing ('vectorShape' or 'shapeGroup')
 * @param extraProps - Additional properties specific to drawing kind
 * @returns Complete DrawingBlock
 *
 * @example
 * ```typescript
 * const geometry = {
 *   width: 100,
 *   height: 50,
 *   rotation: 0,
 *   flipH: false,
 *   flipV: false
 * };
 * const block = buildDrawingBlock(attrs, nextBlockId, positions, node, geometry, 'vectorShape');
 * ```
 */
export declare const buildDrawingBlock: (rawAttrs: Record<string, unknown>, nextBlockId: BlockIdGenerator, positions: PositionMap, node: PMNode, geometry: ShapeDrawingGeometry, drawingKind: ShapeDrawingBlock["drawingKind"], extraProps?: Partial<ShapeDrawingBlock> & {
    lineEnds?: LineEnds;
    effectExtent?: EffectExtent;
}) => ShapeDrawingBlock;
/**
 * Convert a ProseMirror vectorShape node to a DrawingBlock
 *
 * @param node - Vector shape node to convert
 * @param nextBlockId - Block ID generator
 * @param positions - Position map for PM node tracking
 * @returns DrawingBlock or null if conversion fails
 */
export declare function vectorShapeNodeToDrawingBlock(node: PMNode, nextBlockId: BlockIdGenerator, positions: PositionMap): DrawingBlock | null;
/**
 * Convert a ProseMirror shapeGroup node to a DrawingBlock
 *
 * @param node - Shape group node to convert
 * @param nextBlockId - Block ID generator
 * @param positions - Position map for PM node tracking
 * @returns DrawingBlock or null if conversion fails
 */
export declare function shapeGroupNodeToDrawingBlock(node: PMNode, nextBlockId: BlockIdGenerator, positions: PositionMap): DrawingBlock | null;
/**
 * Convert a ProseMirror shapeContainer node to a DrawingBlock
 *
 * @param node - Shape container node to convert
 * @param nextBlockId - Block ID generator
 * @param positions - Position map for PM node tracking
 * @returns DrawingBlock or null if conversion fails
 */
export declare function shapeContainerNodeToDrawingBlock(node: PMNode, nextBlockId: BlockIdGenerator, positions: PositionMap): DrawingBlock | null;
/**
 * Convert a ProseMirror shapeTextbox node to a DrawingBlock
 *
 * @param node - Shape textbox node to convert
 * @param nextBlockId - Block ID generator
 * @param positions - Position map for PM node tracking
 * @returns DrawingBlock or null if conversion fails
 */
export declare function shapeTextboxNodeToDrawingBlock(node: PMNode, nextBlockId: BlockIdGenerator, positions: PositionMap): DrawingBlock | null;
/**
 * Handle vector shape nodes.
 * Converts vector shape node to drawing block.
 *
 * @param node - Vector shape node to process
 * @param context - Shared handler context
 */
export declare function handleVectorShapeNode(node: PMNode, context: NodeHandlerContext): void;
/**
 * Handle shape group nodes.
 * Converts shape group node to drawing block.
 *
 * @param node - Shape group node to process
 * @param context - Shared handler context
 */
export declare function handleShapeGroupNode(node: PMNode, context: NodeHandlerContext): void;
/**
 * Handle shape container nodes.
 * Converts shape container node to drawing block.
 *
 * @param node - Shape container node to process
 * @param context - Shared handler context
 */
export declare function handleShapeContainerNode(node: PMNode, context: NodeHandlerContext): void;
/**
 * Handle shape textbox nodes.
 * Converts shape textbox node to drawing block.
 *
 * @param node - Shape textbox node to process
 * @param context - Shared handler context
 */
export declare function handleShapeTextboxNode(node: PMNode, context: NodeHandlerContext): void;
export {};
//# sourceMappingURL=shapes.d.ts.map