export class LocalStorageManager {
    static getInstance() {
        if (!LocalStorageManager.instance) {
            LocalStorageManager.instance = new LocalStorageManager();
        }
        return LocalStorageManager.instance;
    }
    setValue(key, value) {
        try {
            if (localStorage) {
                localStorage.setItem(key, value);
            }
            else {
            }
        }
        catch (error) {
            console.error("Error saving to localStorage:", error);
        }
    }
    getValue(key) {
        try {
            if (localStorage) {
                return localStorage.getItem(key);
            }
            else {
                return null;
            }
        }
        catch (error) {
            console.error("Error reading from localStorage:", error);
            return null;
        }
    }
    removeValue(key) {
        try {
            if (localStorage) {
                localStorage.removeItem(key);
            }
            else {
            }
        }
        catch (error) {
            console.error("Error removing from localStorage:", error);
        }
    }
    clearStorage() {
        try {
            if (localStorage) {
                localStorage.clear();
            }
            else {
            }
        }
        catch (error) {
            console.error("Error clearing localStorage:", error);
        }
    }
}
//# sourceMappingURL=LocalStorageManager.js.map