#IgnoreWarnings:12
Sub Class_Globals
Public Banano As BANano
Public App As UOENowApp
Public ID As String
Private RadioGroup As UOENowContainer
Public Disabled As Boolean
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(thisApp As UOENowApp, sID As String, sName As String, sTitle As String, sChecked As String, rTheme As String, radios As Map, sClass As String, sVisibility As String)
ID = sID.tolowercase
App = thisApp
RadioGroup.Initialize(App,ID,False,"",sClass,sVisibility)
RadioGroup.SetTag("fieldset")
RadioGroup.SetTYPE("radio")
RadioGroup.AddLegend(ID & "-legend",sTitle)
For Each rkey As String In radios.Keys
Dim rValue As String = radios.Get(rkey)
Dim rID As String = $"${ID}-${rkey}"$
Dim bChecked As Boolean = False
If rkey.EqualsIgnoreCase(sChecked) Then bChecked = True
RadioGroup.AddRadio1(0,0,sName,rID,rValue,rkey,rTheme,"","",bChecked,True,False)
Next
End Sub
Sub ToString As String
RadioGroup.AddAttributeOnCondition(Disabled,"disabled","true")
Return RadioGroup.ToString
End Sub
Sub AddToParent(parentID As String)
parentID = parentID.tolowercase
Dim sout As String = ToString
Banano.GetElement($"#${parentID}"$).Append(sout)
End Sub