How to override macro browser fields to display radio button

Hi Team ,

I am trying to display radio button on edit macro parameter window. I tried to override fields using " AJS.MacroBrowser.setMacroJsOverride" but I’m not able to build the code. It is giving syntax error for radio button js code but the same radio button js code is working fine outside of confluence.

"radio": function (param, options) {
           var paramDiv = AJS.$(Confluence.Templates.MacroBrowser.macroParameter());
                                      var input = AJS.$("#macro-param-div-linkgentype", paramDiv);
                                      var radios = ['Member Only', 'Public'];
                                      for (var value of radios) {
                                        
                                          paramDiv.append(`<input type="radio" id="${value}" name="linkgentype" value="${value}">`)
                                          .append(`<label for="${value}">${value}</label></div>`)
                                          .append(`<br>`);
                                      }
                                    });
                                   return new AJS.MacroBrowser.Field(paramDiv, input, options);
                                   }

Could you please help to suggest if there is any other approach for doing this ? I checked confluence document and does not find anything to directly support radio button as parameter tag type inside xhtml macro ?

Thanks