// import RNDeviceInfo from 'react-native-device-info';
import { createMMKV, MMKV } from 'react-native-mmkv';

let globalStorage: MMKV | null = null;
export function getGlobalStorage() {
    if (!globalStorage) {
        globalStorage = createMMKV({
            id: `global`,
        });
    }
    return globalStorage;
}

let caches: MMKV | null = null;
export function getCaches() {
    if (!caches) {
        caches = createMMKV({
            id: `caches`
        });
    }
    return caches;
}

let apiCache: MMKV | null = null;
export function getApiCache() {
    if (!apiCache) {
        apiCache = createMMKV({
            id: `api_cache`
        });
    }
    return apiCache;
}