import Cookies from 'js-cookie'

const TokenKey = 'admin_token'
const AdminName = 'admin_name'
const AdminLevel = 'admin_level'

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 setName(name) {
  return Cookies.set(AdminName, name)
}

export function setLevel(level) {
  return Cookies.set(AdminLevel, level)
}

export function getName() {
	return Cookies.get(AdminName)
}