import { MMKV } from "react-native-mmkv";

const storage = new MMKV();

export const storeToken = (token: string): void => {
  storage.set("@token", token);
};

export const getToken = (): string | null => {
  return storage.getString("@token") ?? null;
};

export const removeToken = (): void => {
  storage.delete("@token");
};

export { storage as mmkvStorage };
