import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const RoleKey = 'roles'

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 getRole() {
  return window.localStorage.getItem(RoleKey)
}

export function setRole(role) {
  return window.localStorage.setItem(RoleKey, role)
}

export function removeRole() {
  return window.localStorage.removeItem(RoleKey)
}
