import { CYB_BROADCAST_CHANNEL } from './consts';
class BroadcastChannelSender {
    static mockClear() {
        throw new Error('Method not implemented.');
    }
    constructor() {
        this.channel = new BroadcastChannel(CYB_BROADCAST_CHANNEL);
    }
    postServiceStatus(name, status, message) {
        this.channel.postMessage({
            type: 'service_status',
            value: { name, status, message },
        });
    }
    postSyncStatus(status, lastError) {
        this.channel.postMessage({
            type: 'sync_status',
            value: { status, lastError },
        });
    }
    postSyncEntryProgress(entry, state) {
        this.channel.postMessage({ type: 'sync_entry', value: { entry, state } });
    }
    post(msg) {
        this.channel.postMessage(msg);
    }
}
export default BroadcastChannelSender;
//# sourceMappingURL=BroadcastChannelSender.js.map