import {ConfigSettingsGroup} from "./util-config-settings-group.js"; import {ConfigSettingBoolean, ConfigSettingEnum, ConfigSettingExternal} from "./utils-config-setting-base.js"; const settingsGroupStyleSwitcher = new ConfigSettingsGroup({ groupId: "styleSwitcher", name: "Appearance", configSettings: [ new ( class extends ConfigSettingExternal { _configId = "theme"; _name = "Theme"; _help = "The color theme to be applied."; _isRowLabel = true; _getEleExternal () { return StyleSwitcher.getSelStyle(); } } )(), new ( class extends ConfigSettingExternal { _configId = "isWideMode"; _name = "Wide Mode (Experimental)"; _help = "This feature is unsupported. Expect bugs."; _isRowLabel = true; _getEleExternal () { return StyleSwitcher.getCbWide(); } } )(), ], }); const _MARKDOWN_TAG_RENDER_MODES = { "convertMarkdown": "Convert to Markdown", "ignore": "Leave As-Is", "convertText": "Convert to Text", }; const settingsGroupMarkdown = new ConfigSettingsGroup({ groupId: "markdown", name: "Markdown", configSettings: [ new ConfigSettingEnum({ configId: "tagRenderMode", name: `Tag Handling (@tag)`, help: `THe output to produce when rendering a 5etools "@tag".`, isRowLabel: true, default: "convertMarkdown", values: [ "convertMarkdown", "ignore", "convertText", ], fnDisplay: it => _MARKDOWN_TAG_RENDER_MODES[it] || it, }), new ConfigSettingBoolean({ configId: "isAddColumnBreaks", name: `Add GM Binder Column Breaks (\\\\columnbreak)`, help: `If "\\\\columnbreak"s should be added to exported Markdown, at an approximate column breakpoint.`, isRowLabel: true, default: false, }), new ConfigSettingBoolean({ configId: "isAddPageBreaks", name: `Add GM Binder Page Breaks (\\\\pagebreak)`, help: `If "\\\\pagebreak"s should be added to exported Markdown, at an approximate page breakpoint.`, isRowLabel: true, default: false, }), ], }); export const SETTINGS_GROUPS = [ settingsGroupStyleSwitcher, settingsGroupMarkdown, ];