package crdt

import (
	"github.com/yjs/y-websocket/go/yws"
)

type Provider struct {
	doc *yws.Doc
}

func NewProvider() *Provider {
	doc := yws.NewDoc()
	return &Provider{
		doc: doc,
	}
}

func (p *Provider) GetDoc() *yws.Doc {
	return p.doc
}

func (p *Provider) BroadcastUpdate(update []byte) {
	// TODO: Broadcast Yjs update to all connected clients
}
