import type { TableNode } from '../../ricos-schema/next-schema/index.js';
import type { Node as ProseMirrorNode } from '../../tiptap/pm/model';
export interface BorderStyle {
    color: string;
    width: number;
    zIndex: number;
    extendStart: number;
    extendEnd: number;
    perpStartZ: number;
    perpEndZ: number;
    parallelStartZ: number;
    parallelEndZ: number;
}
export declare const getCornerOffset: ({ thisZ, perpZ, parallelZ, extAmount, isHorizontal, isStartCorner, }: {
    thisZ: number;
    perpZ: number;
    parallelZ: number;
    extAmount: number;
    isHorizontal: boolean;
    isStartCorner: boolean;
}) => number;
export interface CellBorders {
    top: BorderStyle | null;
    right: BorderStyle | null;
    bottom: BorderStyle | null;
    left: BorderStyle | null;
}
export interface BorderPadding {
    start: number;
    end: number;
    top: number;
    bottom: number;
}
export type ResolvedBordersMap = Map<string, CellBorders>;
export declare function resolveCellBorders(tableNode: TableNode, options?: {
    drawDefaultGrid?: boolean;
    cellSpacing?: number;
}): ResolvedBordersMap;
export declare function calculateBorderPadding(tableNode: TableNode): BorderPadding;
export declare function resolveCellBordersPm(tableNode: ProseMirrorNode, options?: {
    drawDefaultGrid?: boolean;
    cellSpacing?: number;
}): ResolvedBordersMap;
type CellPlacementLike = {
    row: number;
    col: number;
    rowspan: number;
    colspan: number;
};
type BorderSideKey = 'top' | 'bottom' | 'left' | 'right';
/**
 * `resolveCellBordersPm` returns each shared edge on only ONE side (the canonical winner)
 * to avoid double-drawing in decorations. For read-back UIs (toolbar/modal) we want the
 * user-perceived border on either side, so fall back to the neighbour cell's opposite
 * side when our own side resolved to null.
 */
export declare function getDisplayedBorderOnSide(resolved: ResolvedBordersMap, tableNode: ProseMirrorNode, cellId: string, cell: CellPlacementLike, side: BorderSideKey): BorderStyle | null;
export {};
//# sourceMappingURL=resolve-cell-borders.d.ts.map