import { isModern } from "./TinyVersions";

interface ThemeSelectors {
  toolBarSelector: string;
  menuBarSelector: string;
  dialogCloseSelector: string;
  dialogSubmitSelector: string;
}

const ModernThemeSelectors: ThemeSelectors = {
  toolBarSelector:'.mce-toolbar-grp',
  menuBarSelector: '.mce-menubar',
  dialogCloseSelector: 'div[role="button"]:contains(Cancel)',
  dialogSubmitSelector:'div[role="button"].mce-primary'
};

const SilverThemeSelectors: ThemeSelectors = {
  toolBarSelector:'.tox-toolbar',
  menuBarSelector: '.tox-menubar',
  dialogCloseSelector: '.tox-button:contains("Cancel")',
  dialogSubmitSelector: '.tox-button:contains("Save")'
};

const getThemeSelectors = (): ThemeSelectors => {
  return isModern() ? ModernThemeSelectors : SilverThemeSelectors;
};

export {
  getThemeSelectors
}
import { isModern } from "./TinyVersions";

interface ThemeSelectors {
  toolBarSelector: string;
  menuBarSelector: string;
  dialogCloseSelector: string;
  dialogSubmitSelector: string;
}

const ModernThemeSelectors: ThemeSelectors = {
  toolBarSelector:'.mce-toolbar-grp',
  menuBarSelector: '.mce-menubar',
  dialogCloseSelector: 'div[role="button"]:contains(Cancel)',
  dialogSubmitSelector:'div[role="button"].mce-primary'
};

const SilverThemeSelectors: ThemeSelectors = {
  toolBarSelector:'.tox-toolbar',
  menuBarSelector: '.tox-menubar',
  dialogCloseSelector: '.tox-button:contains("Cancel")',
  dialogSubmitSelector: '.tox-button:contains("Ok")'
};

const getThemeSelectors = (): ThemeSelectors => {
  return isModern() ? ModernThemeSelectors : SilverThemeSelectors;
}

export {
  getThemeSelectors
}
--- 
+++ 
@@ -18,12 +18,12 @@
   toolBarSelector:'.tox-toolbar',
   menuBarSelector: '.tox-menubar',
   dialogCloseSelector: '.tox-button:contains("Cancel")',
-  dialogSubmitSelector: '.tox-button:contains("Ok")'
+  dialogSubmitSelector: '.tox-button:contains("Save")'
 };
 
 const getThemeSelectors = (): ThemeSelectors => {
   return isModern() ? ModernThemeSelectors : SilverThemeSelectors;
-}
+};
 
 export {
   getThemeSelectors
TINY-2281: Swap to using "Save" instead of "Ok" for dialog confirmation selectors
