import {
	getStore,
	setStore
} from '@/untils/store.js'

export function getToken() {
	return getStore({
		name: 'token'
	})
}

export function setToken(token) {
	return setStore({
		name: 'token',
		content: token,
		type: 'session'
	})
}

export function getRefreshToken() {
	return getStore({
		name: 'refreshToken'
	})
}

export function setRefreshToken(token) {
	return setStore({
		name: 'refreshToken',
		content: token,
		type: 'session'
	})
}

export function removeToken() {
	return setToken('')
}

export function removeRefreshToken() {
	return setRefreshToken('')
}
