import Cookies from 'js-cookie'

const TokenKey = 'TokenZ'
const FirstKey = 'NeedGide'
const isSuper = 'isSuper'
const name = 'userName';

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

export function getFirst() {
  return Cookies.get(FirstKey) === undefined
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, { expires: 30 })
}

export function setFirst() {
  return Cookies.set(FirstKey, 'skip', { expires: 30 })
}

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

export function removeFirst() {
  return Cookies.remove(FirstKey)
}

export function getIsSuper() {
  return Cookies.get(isSuper)
}

export function setIsSuper(key) {
  return Cookies.set(isSuper, key, { expires: 30 })
}
export function removeIsSuper() {
  return Cookies.remove(isSuper)
}
