import getMeta from '@/utils/meta' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' const overrides = new Map([['overleaf', 'overleaf light']]) function getThemeName(theme: string): string { return (overrides.get(theme) ?? theme).replace(/_/g, ' ') } type PossibleValue = string | number | boolean type Option = { value: T label: string ariaHidden?: 'true' | 'false' disabled?: boolean } export function useEditorThemesOptionGroups() { const editorThemes = getMeta('ol-editorThemes') const legacyEditorThemes = getMeta('ol-legacyEditorThemes') const { t } = useTranslation() const optgroups = useMemo(() => { const lightThemes: Array