import Cookies from 'js-cookie'
import { exp } from 'qrcode/lib/core/galois-field'

const TokenKey = 'Admin-Token'
const UserTypeKey = "User-Type"

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 getUserType() {
  return window.localStorage.getItem(UserTypeKey);
}

export function setUserType(userType) {
  return window.localStorage.setItem(UserTypeKey, userType);
}

export function removeUserType() {
  return window.localStorage.removeItem(UserTypeKey);
}
