import Cookies from 'js-cookie'

const TokenKey = 'EAP-Token'

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

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

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

export function setCookieUserid(userid) {
  return Cookies.set("userid",userid);
}
export function removeCookieUserid() {
  return Cookies.remove("userid");
}

const  terminalKey = 'S-TERMINAL'
export function getTerminal() {
  let terminal = Cookies.get(terminalKey)
  return terminal;
}

export function setTerminal(value) {
  return Cookies.set(terminalKey, value)
}

export function removeTerminal() {
  return Cookies.remove(terminalKey)
}