import { SESSION_KEY } from '../storage'

const token = {
    get value() {
        return window.localStorage.getItem(SESSION_KEY)
    },
    set value(token) {
        if (!token) {
            window.localStorage.removeItem(SESSION_KEY)
        } else {
            window.localStorage.setItem(SESSION_KEY, token)
        }
    }
}

export {
    SESSION_KEY,
    token
}
