import type { SuggestedEdit } from "../../types";
export type SuggestionDisplayMode = "baseline" | "suggestions";
export type SuggestionDisplayFormat = "plain" | "diff";
export type SuggestionDisplayField = {
    fieldId: string;
    itemId: string;
    language: string;
    version: number;
    pageItemId?: string;
    pageItemLanguage?: string;
    pageItemVersion?: number | null;
};
export type SuggestionDisplayModifiedField = {
    fieldId: string;
    item: {
        id: string;
        language: string;
        version: number;
    };
    value: string | null;
};
export type SuggestionDisplayResult = {
    baselineValue: string;
    mergedValue: string;
    selectedValue: string;
    displayValue: string;
    suggestions: SuggestedEdit[];
    hasSuggestions: boolean;
    variants: SuggestionVariant[];
    conflicts: SuggestedEdit[];
    selectedVariantId?: string;
};
export type SuggestionVariant = {
    id: string;
    value: string;
    suggestion?: SuggestedEdit;
};
export type SuggestionMergeResult = {
    mergedValue: string;
    cleanSuggestions: SuggestedEdit[];
    conflicts: SuggestedEdit[];
};
export declare function getSuggestedEditItemLanguage(suggestion: SuggestedEdit): string;
export declare function getSuggestedEditItemVersion(suggestion: SuggestedEdit): number;
export declare function getSuggestionFieldIdentityKey({ itemId, language, version, fieldId, }: {
    itemId: string;
    language: string;
    version: number;
    fieldId: string;
}): string;
export declare function getSuggestionSelectionKey({ itemId, language, fieldId, }: {
    itemId: string;
    language: string;
    fieldId: string;
}): string;
export declare function getPendingFieldSuggestions(suggestedEdits: SuggestedEdit[], field: SuggestionDisplayField): SuggestedEdit[];
export declare function getBaselineFieldValue({ repositoryValue, modifiedFields, field, }: {
    repositoryValue: string | null | undefined;
    modifiedFields?: SuggestionDisplayModifiedField[];
    field: SuggestionDisplayField;
}): string;
export declare function mergePendingSuggestionValues(baselineValue: string, suggestions: SuggestedEdit[]): string;
export declare function partitionPendingSuggestionValues(baselineValue: string, suggestions: SuggestedEdit[]): SuggestionMergeResult;
/**
 * Returns the pending suggestions that cannot coexist with the requested
 * suggestion. Conflict membership is deliberately pairwise and symmetric:
 * the suggestion chosen as the fold baseline must not appear conflict-free
 * merely because it sorted first.
 */
export declare function getConflictingSuggestionPeers(suggestions: SuggestedEdit[], suggestionId: string): SuggestedEdit[];
export declare function getSuggestionDiffHtml(baselineValue: string, mergedValue: string): string;
export declare function getSuggestionDisplayValue({ repositoryValue, modifiedFields, suggestedEdits, field, mode, format, selectedVariantId: requestedVariantId, }: {
    repositoryValue: string | null | undefined;
    modifiedFields?: SuggestionDisplayModifiedField[];
    suggestedEdits: SuggestedEdit[];
    field: SuggestionDisplayField;
    mode: SuggestionDisplayMode;
    format?: SuggestionDisplayFormat;
    selectedVariantId?: string;
}): SuggestionDisplayResult;
