"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const source_1 = require("./source");
/**
 * Participant is a Source for the participant themselves.
 */
class ParticipantSource extends source_1.Source {
    /**
     * @override
     */
    compare(_previous, next) {
        return [
            {
                method: 'onParticipantUpdate',
                params: { participants: [next] },
            },
        ];
    }
    /**
     * @override
     */
    sourceProp() {
        return 'participant';
    }
    /**
     * @override
     */
    createPacket(source) {
        return [
            {
                method: 'onParticipantJoin',
                params: { participants: [source] },
            },
        ];
    }
}
exports.ParticipantSource = ParticipantSource;
