import { ColumnLayout, FlowBlock, SectionVerticalAlign } from '../../contracts/src/index.js';
/**
 * Section-level formatting properties that control page layout.
 *
 * Used to apply Word-style section breaks with custom page dimensions,
 * margins, columns, and orientation. Each section can have independent
 * formatting, enabling mixed layouts within a single document.
 *
 * @property margins - Page margin distances from page edges (in pixels)
 * @property pageSize - Page dimensions in pixels (width and height)
 * @property columns - Multi-column layout configuration
 * @property orientation - Page orientation (portrait or landscape)
 * @property vAlign - Vertical alignment of content within the section's pages
 */
export type SectionProps = {
    margins?: {
        header?: number;
        footer?: number;
        top?: number;
        right?: number;
        bottom?: number;
        left?: number;
    };
    pageSize?: {
        w: number;
        h: number;
    };
    columns?: ColumnLayout;
    orientation?: 'portrait' | 'landscape';
    vAlign?: SectionVerticalAlign;
};
/**
 * Pre-scans sectionBreak blocks to map each DOCX-derived boundary to the next section's properties.
 *
 * Word uses "end-tagged" sectPr semantics: the properties that apply to a section are stored
 * at the END of that section (on the following sectPr node). This function walks backwards
 * through the block list to build a lookahead map that tells the layout engine which properties
 * to use when starting a new page after each section break.
 *
 * Special cases:
 * - The first section (`isFirstSection=true`) keeps its own properties (no lookahead)
 * - Non-DOCX section breaks (`attrs.source !== 'sectPr'`) are ignored
 * - The final section break falls back to its own properties when there's no following sectPr
 *
 * Guard for PM-adapter blocks with sectionIndex:
 * The layout engine only applies this lookahead when a sectionBreak lacks `attrs.sectionIndex`.
 * PM-adapter blocks that have a sectionIndex already embed the upcoming section's metadata
 * directly on the block, so they don't need the map-based lookahead. This prevents double-
 * application and ensures the map is only used for synthetic test fixtures or legacy structures.
 *
 * @param blocks - Array of FlowBlocks to scan for section breaks
 * @returns Map from block index to the section properties that should apply AFTER that break
 *
 * @example
 * ```typescript
 * import { computeNextSectionPropsAtBreak } from './section-props.js';
 *
 * const map = computeNextSectionPropsAtBreak(blocks);
 * const propsForNextPage = map.get(sectionBreakIndex);
 * if (propsForNextPage) {
 *   // Apply these properties when starting the page after this break
 * }
 * ```
 */
export declare function computeNextSectionPropsAtBreak(blocks: FlowBlock[]): Map<number, SectionProps>;
//# sourceMappingURL=section-props.d.ts.map