import { ParagraphAttrs, ParagraphSpacing } from '../../../../../../../layout-engine/contracts/src/index.js';
import { ParagraphSpacing as OoxmlParagraphSpacing } from '../../../../../../../layout-engine/style-engine/src/ooxml/index.js';
/**
 * Threshold for distinguishing pixel values from twips in indent values.
 *
 * Values with absolute value <= 50 are treated as already-converted pixels.
 * Values > 50 are treated as twips and converted to pixels.
 *
 * Limitation: This creates an ambiguous zone where legitimate pixel values
 * 51-100 will be incorrectly converted from twips. This is a known limitation
 * of the heuristic approach used when the source format is ambiguous.
 */
/**
 * Normalizes paragraph alignment values from OOXML format.
 *
 * Maps OOXML alignment values to standard alignment format. Case-sensitive.
 * Converts 'start'/'end' to physical directions based on paragraph direction:
 * - LTR: start→left, end→right
 * - RTL: start→right, end→left
 *
 * IMPORTANT: 'left' must return 'left' (not undefined) so that explicit left alignment
 * from paragraph properties can override style-based center/right alignment.
 *
 * @param value - OOXML alignment value ('center', 'right', 'justify', 'start', 'end', 'left')
 * @param isRtl - Whether the paragraph is right-to-left
 * @returns Normalized alignment value, or undefined if invalid
 */
export declare const normalizeAlignment: (value: unknown, isRtl?: boolean) => ParagraphAttrs["alignment"];
/**
 * Normalizes paragraph spacing from raw OOXML attributes.
 *
 * Converts spacing values from twips to pixels, handling both standard OOXML
 * properties (before, after, line) and alternative properties (lineSpaceBefore, lineSpaceAfter).
 * For auto line spacing, values <= 10 are treated as multipliers, larger values are treated as
 * OOXML "240ths of a line" and converted to multipliers (e.g., 276 -> 1.15).
 * If w:line is present but w:lineRule is missing, defaults to 'auto' per OOXML.
 *
 * @param value - Raw OOXML spacing object with properties like before, after, line, lineRule
 * @returns Normalized spacing object with values in pixels, or undefined if no valid spacing
 *
 * @example
 * ```typescript
 * normalizeParagraphSpacing({ before: 240, after: 240, line: 360, lineRule: 'auto' });
 * // { before: 16, after: 16, line: 1.5, lineRule: 'auto' } (line is multiplier)
 *
 * normalizeParagraphSpacing({ before: 240, line: 480, lineRule: 'exact' });
 * // { before: 16, line: 32, lineRule: 'exact' } (line converted from twips)
 * ```
 */
export declare const normalizeParagraphSpacing: (value: OoxmlParagraphSpacing | undefined, isList: boolean) => ParagraphSpacing | undefined;
/**
 * Normalizes line spacing value based on line rule.
 * Converts OOXML line spacing values to a multiplier of font size.
 * @param value - OOXML line spacing value in twips
 * @param lineRule - Line rule ('auto', 'exact', 'atLeast')
 * @returns Normalized line spacing value as a multiplier, or undefined
 */
export declare const normalizeLineValue: (value: number | undefined, lineRule: ParagraphSpacing["lineRule"] | undefined) => {
    value: number;
    unit: "multiplier" | "px";
};
/**
 * Normalizes line rule values from OOXML format.
 *
 * Validates and returns line rule if it's one of the valid values.
 *
 * @param value - OOXML line rule value ('auto', 'exact', or 'atLeast')
 * @returns Normalized line rule value, or undefined if invalid
 *
 * @example
 * ```typescript
 * normalizeLineRule('auto'); // 'auto'
 * normalizeLineRule('exact'); // 'exact'
 * normalizeLineRule('invalid'); // undefined
 * ```
 */
export declare const normalizeLineRule: (value: unknown) => ParagraphSpacing["lineRule"];
//# sourceMappingURL=spacing-indent.d.ts.map