/**
 * ConflictResolution — runtime-backed description of how a conflict was resolved.
 *
 * @module domain/types/conflict/ConflictResolution
 */
import ConflictEventIdRef from './ConflictEventIdRef.ts';
type Basis = {
    code: string;
    reason?: string | undefined;
};
/**
 * Input shape for a winner/loser event-id carrier on a comparator.
 * Either an already-constructed ConflictEventIdRef or the matching
 * field bag (the normalizer converts through ConflictEventIdRef.from).
 */
type EventIdInput = ConflictEventIdRef | {
    lamport: number;
    writerId: string;
    patchSha: string;
    opIndex: number;
};
export type ConflictComparatorInput = {
    type: string;
    winnerEventId?: EventIdInput;
    loserEventId?: EventIdInput;
};
type Comparator = {
    type: string;
    winnerEventId?: ConflictEventIdRef;
    loserEventId?: ConflictEventIdRef;
};
/**
 * A runtime-backed description of how a conflict was resolved by the reducer.
 *
 * Instances are frozen on construction. Nested basis and comparator objects are deep-frozen.
 */
export default class ConflictResolution {
    readonly reducerId: string;
    readonly basis: Readonly<Basis>;
    readonly winnerMode: string;
    readonly comparator: Comparator | undefined;
    /**
     * Creates a frozen ConflictResolution.
     */
    constructor({ reducerId, basis, winnerMode, comparator }: {
        reducerId: string;
        basis: Basis;
        winnerMode: 'immediate' | 'eventual';
        comparator?: ConflictComparatorInput;
    });
    /**
     * Builds a ConflictResolution from conflict candidate parameters.
     */
    static fromCandidate({ reducerId, kind, code, winner, loser }: {
        reducerId: string;
        kind: string;
        code: string;
        winner: {
            eventId: {
                lamport: number;
                writerId: string;
                patchSha: string;
                opIndex: number;
            };
        };
        loser: {
            receiptReason?: string;
            eventId: {
                lamport: number;
                writerId: string;
                patchSha: string;
                opIndex: number;
            };
        };
    }): ConflictResolution;
}
export {};
