import Cookies from 'js-cookie'
import config from "~src/config/index";

export const getToken = () => {
    return Cookies.get(config.tokenKey)
}

export const setToken = (token) => {
    return Cookies.set(config['tokenKey'], token)
}

export const getRefreshToken = () => {
    return Cookies.get(config['refreshTokenKey'])
}

export const setRefreshToken = (token) => {
    return Cookies.set(config['refreshTokenKey'], token)
}

export const removeToken = () => {
    return Cookies.remove(config['tokenKey'])
}

export const removeRefreshToken = () => {
    return Cookies.remove(config['refreshTokenKey'])
}
