package input // Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT. import "fmt" import "reflect" import "github.com/vugu/vjson" import "github.com/vugu/vugu" import js "github.com/vugu/vugu/js" import ( //"git.d3nexus.de/Dadido3/D3vugu-components/icons" "git.d3nexus.de/Dadido3/D3vugu-components/utils" ) func (c *RadioButton) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) { vgout = &vugu.BuildOut{} var vgiterkey interface{} _ = vgiterkey var vgn *vugu.VGNode vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "input", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "type", Val: "radio"}}} vgout.Out = append(vgout.Out, vgn) // root for output vgn.AddAttrList(utils.AttributesAppend{AttrMap: c.AttrMap, Classes: "d3c-1687535513"}) { b, err := vjson.Marshal(c.isChecked()) if err != nil { panic(err) } vgn.Prop = append(vgn.Prop, vugu.VGProperty{Key: "checked", JSONVal: vjson.RawMessage(b)}) } vgn.DOMEventHandlerSpecList = append(vgn.DOMEventHandlerSpecList, vugu.DOMEventHandlerSpec{ EventType: "click", Func: func(event vugu.DOMEvent) { c.handleChange(event) }, // TODO: implement capture, etc. mostly need to decide syntax }) vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)} { vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1687535513 {\n\t\taccent-color: var(--d3c-color-accent);\n\t}\n", Attr: []vugu.VGAttribute(nil)}) } vgout.AppendCSS(vgn) return vgout } // 'fix' unused imports var _ fmt.Stringer var _ reflect.Type var _ vjson.RawMessage var _ js.Value