import { ParagraphAttrs, ParagraphBorders } from '../../../../../contracts/src/index.js';
import { BetweenBorderInfo } from './group-analysis.js';
/**
 * Computes the indent-aware bounding box for paragraph border/shading layers.
 * Borders hug the paragraph content, inset by left/right/firstLine/hanging indents.
 */
export declare const getParagraphBorderBox: (fragmentWidth: number, indent?: ParagraphAttrs["indent"]) => {
    leftInset: number;
    width: number;
};
/**
 * Computes the outward expansion for the border/shading layers based on
 * the `space` attribute (OOXML: distance between border and text, in points).
 *
 * Within between-border groups, suppressed sides don't expand (the gap
 * extension handles visual continuity instead).
 *
 * @spec ECMA-376 §17.3.1.24 — space attribute on pBdr child elements
 */
export declare const computeBorderSpaceExpansion: (borders?: ParagraphBorders, betweenInfo?: BetweenBorderInfo) => {
    top: number;
    bottom: number;
    left: number;
    right: number;
};
/**
 * Builds overlay elements for paragraph shading and borders.
 * Returns layers in the order they should be appended (shading below borders).
 *
 * When `betweenInfo` indicates this fragment is in a border group:
 * - The border layer extends downward by `gapBelow` px into the paragraph-spacing
 *   gap, making left/right borders visually continuous across the group.
 * - `suppressTopBorder` hides the top border for non-first group members.
 * - `showBetweenBorder` replaces the bottom border with the between definition.
 *
 * The `space` attribute on each border side expands the layer outward,
 * creating padding between the border line and the paragraph text.
 */
export declare const createParagraphDecorationLayers: (doc: Document, fragmentWidth: number, attrs?: ParagraphAttrs, betweenInfo?: BetweenBorderInfo) => {
    shadingLayer?: HTMLElement;
    borderLayer?: HTMLElement;
};
/**
 * Applies paragraph border styles to an HTML element.
 *
 * Handles between-border groups:
 * - `suppressTopBorder`: skips top border for non-first group members
 * - `showBetweenBorder`: replaces bottom with the between border definition
 */
export declare const applyParagraphBorderStyles: (element: HTMLElement, borders?: ParagraphAttrs["borders"], betweenInfo?: BetweenBorderInfo) => void;
/**
 * Stamps between-border info onto an element's dataset for debugging
 * and incremental update cache invalidation.
 */
export declare const stampBetweenBorderDataset: (element: HTMLElement, betweenInfo?: BetweenBorderInfo) => void;
/**
 * Applies paragraph shading (background color) to an HTML element.
 */
export declare const applyParagraphShadingStyles: (element: HTMLElement, shading?: ParagraphAttrs["shading"]) => void;
//# sourceMappingURL=border-layer.d.ts.map