/*!
 * Copyright 2018 by ChartIQ, Inc.
 * All rights reserved.
 */
import { FEAGlobals } from "../../../../common/Globals";
export { createStore, getStore };
const defaultValues = [
    {
        field: "apps",
        value: [],
    },
    {
        field: "filteredApps",
        value: [],
    },
    {
        field: "activeTags",
        value: [],
    },
    {
        field: "activeApp",
        value: null,
    },
    {
        field: "searchText",
        value: "",
    },
    {
        field: "forceSearch",
        value: false,
    },
];
let appCatalogStore;
function createStore(cb) {
    FEAGlobals.FSBL.Clients.DistributedStoreClient.getStore({ store: "Finsemble-AppLauncher-Store", global: true }, (err, store) => {
        if (store) {
            appCatalogStore = store;
            // set default values before initializing the store with values from storage.
            appCatalogStore.setValues(defaultValues, () => {
                cb(null, appCatalogStore);
            });
        }
    });
}
function getStore() {
    return appCatalogStore;
}
//# sourceMappingURL=appStore.js.map