const TokenKey = 'Admin-Token';

const tokenStorage = useStorage<null | string>(TokenKey, null);

// TODO: 临时测试用的固定token，正式环境需要删除
const TEST_TOKEN = '';
export const getToken = () => tokenStorage.value || TEST_TOKEN;

export const setToken = (access_token: string) => (tokenStorage.value = access_token);

export const removeToken = () => (tokenStorage.value = null);
