"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
const BrowserFolder_1 = require("./BrowserFolder");
const StorageBase_1 = require("./StorageBase");
const localforage_1 = require("localforage");
class BrowserStorage extends StorageBase_1.default {
    rootFolder;
    static isConfigured = false;
    static ensureConfigured() {
        if (!BrowserStorage.isConfigured) {
            localforage_1.default.config({
                name: "Minecraft Creator Tools",
                storeName: "minecraft_creator_tools",
                version: 1.0,
            });
            BrowserStorage.isConfigured = true;
        }
    }
    constructor(name) {
        super();
        if (name == null) {
            name = "";
        }
        else {
            name = "." + name;
        }
        BrowserStorage.ensureConfigured();
        this.rootFolder = new BrowserFolder_1.default(this, null, "fs" + name, "root");
    }
    async getAvailable() {
        this.available = true;
        return this.available;
    }
}
exports.default = BrowserStorage;

//# sourceMappingURL=../maps/storage/BrowserStorage.js.map
