// NewBoolValueNodeTexter returns a new instance of BoolValueNodeTexter.
func NewBoolValueNodeTexter(node *viewmodel.BoolValueNode, listener ViewModelListener) *BoolValueNodeTexter {
	texter := &BoolValueNodeTexter{node: node}

	node.Subscribe(func(bool) {
		listener.OnMainDataChanged()
	})

	return texter
}
func (filler *viewModelFiller) BoolValue(node *viewmodel.BoolValueNode) {
	observable := ko.NewObservable(node.Get())

	filler.object = observable.ToJS()
	filler.object.Set("type", "bool")
	filler.object.Set("label", node.Label())
	node.Subscribe(func(newValue bool) {
		if observable.Get().Bool() != newValue {
			observable.Set(newValue)
		}
	})
	observable.Subscribe(func(jsValue *js.Object) {
		newValue := jsValue.Bool()

		if node.Get() != newValue {
			node.Set(newValue)
		}
	})
}