import Cookies from 'store';

const TokenKey = 'SY-Token';
const SSOConfigKey = 'SY-SSOCONFIG';
const MenuVisibleKey = 'SY-MENUS-VISIBLE';
const PlatformTokenKey = 'PLATFORM-Token';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function getSSOConfig() {
  return Cookies.get(SSOConfigKey);
}

export function setSSOConfig(token) {
  return Cookies.set(SSOConfigKey, token);
}

export function removeSSOConfig() {
  return Cookies.remove(SSOConfigKey);
}

export function getMenuVisible() {
  return Cookies.get(MenuVisibleKey);
}

export function setMenuVisible(flag) {
  return Cookies.set(MenuVisibleKey, flag);
}

export function removeMenuVisible() {
  return Cookies.remove(MenuVisibleKey);
}

export function getPlatformToken() {
  return Cookies.get(PlatformTokenKey);
}

export function setPlatformToken(token) {
  return Cookies.set(PlatformTokenKey, token);
}

export function removePlatformToken() {
  return Cookies.remove(PlatformTokenKey);
}
