import Cookies from 'js-cookie'

const adminThemeKey = 'admin-theme'

export function getTheme() {
  return 'normal'
}

export function setTheme(theme) {
  return Cookies.set(adminThemeKey, 'normal')
}

export function removeTheme() {
  return Cookies.remove(adminThemeKey)
}

/**
 * 检查并切换主题.
 */
export function checkSwitchTheme() {
  try {
    setTheme('normal')
    document.documentElement.setAttribute('class', '')
  } catch (er) {
    console.log('checkSwitchTheme', er)
  }
}

