export const themes: any = {
  dark: {
    "--color-primary": "#4583ff",
    "--color-primary-hover": "#1677ff",
    "--color-primary-disabled": "#bae7ff",
    "--color-background": "#1e2430",
    "--color-background-active": "#161f2c",
    "--color-background-hover": "#181f29",
    "--color-background-input": "#303746",
    "--color-background-editor": "#0f151f",
    "--color-background-popup": "#303746",
  },
  light: {
    "--color-primary": "#1890ff",
    "--color-primary-hover": "#1791ff",
    "--color-primary-disabled": "#bae7ff",
    "--color-background": "#fff",
    "--color-background-active": "#161f2c",
    "--color-background-hover": "#181f29",
    "--color-background-input": "#303746",
    "--color-background-editor": "#0f151f",
    "--color-background-popup": "#303746",
  },
};

export function switchTheme(themeName: string) {
  let theme = themes[themeName];
  for (let key in theme) {
    document.documentElement.style.setProperty(key, theme[key]);
  }
}
