/**
 * OpSuperseded — the operation was overridden by a concurrent write
 * with a higher EventId under LWW semantics.
 *
 * @module domain/types/ops/OpSuperseded
 */
import OpOutcomeResult from "./OpOutcomeResult.js";
export default class OpSuperseded extends OpOutcomeResult {
    /** The winning EventId under LWW comparison. */
    winner;
    /** Human-readable explanation. */
    reason;
    constructor(target, winner) {
        super(target, 'superseded');
        this.winner = winner;
        this.reason = `LWW: writer ${winner.writerId} at lamport ${winner.lamport} wins`;
        Object.freeze(this);
    }
}
