function populateThemeOption(
  folder,
  guiState,
  themes,
  defaultThemeName,
  onChange,
) {
  setTooltip(
    folder
      .add(guiState, 'themeName')
      .options(Object.keys(themes))
      .name('theme')
      .onChange((value) => {
        guiState.themeName = value;
        onChange('theme', themes[value]);
      }),
    'The theme used by Blockly.',
  );
  if (guiState.themeName !== defaultThemeName) {
    openFolderIfOptionSelected(folder, guiState, guiState.options, ['theme']);
  }
}
Populate the theme option.
@param {dat.GUI} folder The dat.GUI folder.
@param {Object} guiState The GUI state.
@param {Object<string,Blockly.Theme>} themes The list of
    themes.
@param {string} defaultThemeName Default Theme name.
@param {function(string, *):void} onChange On Change method.