import { invoke } from "@tauri-apps/api/core"

type Theme = "auto" | "light" | "dark"

export async function getTheme() {
  return invoke<Theme>("plugin:theme|get_theme")
}

export function setTheme(theme: Theme) {
  return invoke("plugin:theme|set_theme", {
    theme: theme,
  })
}
