import { ColumnLayout, SectionBreakBlock } from '../../contracts/src/index.js';
export type SectionState = {
    activeTopMargin: number;
    activeBottomMargin: number;
    activeLeftMargin: number;
    activeRightMargin: number;
    pendingTopMargin: number | null;
    pendingBottomMargin: number | null;
    pendingLeftMargin: number | null;
    pendingRightMargin: number | null;
    activeHeaderDistance: number;
    activeFooterDistance: number;
    pendingHeaderDistance: number | null;
    pendingFooterDistance: number | null;
    activePageSize: {
        w: number;
        h: number;
    };
    pendingPageSize: {
        w: number;
        h: number;
    } | null;
    activeColumns: ColumnLayout;
    pendingColumns: ColumnLayout | null;
    activeOrientation: 'portrait' | 'landscape' | null;
    pendingOrientation: 'portrait' | 'landscape' | null;
    hasAnyPages: boolean;
};
export type BreakDecision = {
    forcePageBreak: boolean;
    forceMidPageRegion: boolean;
    requiredParity?: 'even' | 'odd';
};
/** Default single-column configuration per OOXML spec (absence of w:cols element) */
export declare const SINGLE_COLUMN_DEFAULT: Readonly<ColumnLayout>;
/**
 * Schedule section break effects by updating pending/active state and returning a break decision.
 *
 * This function analyzes a section break block to determine what layout changes should occur
 * (e.g., page break, column changes) and schedules the new section properties (margins, page size,
 * columns) to be applied at the appropriate boundary. It is pure with respect to inputs/outputs
 * and does not mutate external variables.
 *
 * The function handles special cases like the first section (applied immediately to active state)
 * and accounts for header content height to prevent header/body overlap.
 *
 * Column handling follows OOXML spec: absence of <w:cols> element means single column layout.
 * When a section break has no columns defined, it resets to single column (not inherited from previous).
 *
 * @param block - The section break block with margin/page/column settings
 * @param state - Current section state containing active and pending layout properties
 * @param baseMargins - Base document margins in pixels (top, bottom, left, right)
 * @param maxHeaderContentHeight - Maximum header content height in pixels across all header variants.
 *        When provided (> 0), ensures body content starts below header content by adjusting top margin
 *        to be at least headerDistance + maxHeaderContentHeight. Defaults to 0 (no header overlap prevention).
 * @param maxFooterContentHeight - Maximum footer content height in pixels across all footer variants.
 *        When provided (> 0), ensures body content ends above footer content by adjusting bottom margin
 *        to be at least footerDistance + maxFooterContentHeight. Defaults to 0 (no footer overlap prevention).
 * @returns Object containing:
 *   - decision: Break decision with flags for page breaks, mid-page regions, and parity requirements
 *   - state: Updated section state with scheduled pending properties
 * @example
 * ```typescript
 * // Schedule a next-page section break with new margins
 * const { decision, state: newState } = scheduleSectionBreak(
 *   {
 *     kind: 'sectionBreak',
 *     type: 'nextPage',
 *     margins: { top: 72, bottom: 72, header: 36, footer: 36 },
 *     columns: { count: 2, gap: 24 }
 *   },
 *   currentState,
 *   { top: 72, bottom: 72, left: 72, right: 72 },
 *   48 // header content height
 * );
 * // decision.forcePageBreak === true
 * // newState.pendingTopMargin === Math.max(72, 36 + 48) = 84
 * ```
 */
export declare function scheduleSectionBreak(block: SectionBreakBlock, state: SectionState, baseMargins: {
    top: number;
    bottom: number;
    left: number;
    right: number;
}, maxHeaderContentHeight?: number, maxFooterContentHeight?: number): {
    decision: BreakDecision;
    state: SectionState;
};
/**
 * Apply pending section state to active state at a page boundary.
 * Transfers all pending values (margins, page size, columns, orientation) to their
 * active counterparts and clears the pending values.
 *
 * @param state - Current section state with pending values to apply
 * @returns New section state with pending values applied to active and pending cleared
 */
export declare function applyPendingToActive(state: SectionState): SectionState;
//# sourceMappingURL=section-breaks.d.ts.map