// Default config for advanced app launcher
export const initializeAdvancedAppLauncherPrefs = () => {
    return {
        foldersList: ["Advanced App Launcher", "Favorites"],
        folders: {
            "Advanced App Launcher": {
                name: "Advanced App Launcher",
                type: "folder",
                canDelete: false,
                canEdit: false,
                apps: [],
            },
            Favorites: {
                name: "Favorites",
                type: "folder",
                canDelete: false,
                canEdit: false,
                apps: [],
            },
        },
        activeFolder: "Advanced App Launcher",
        activeTags: [],
        activeLauncherTags: [], // Backward compatibility with Finsemble v7
        dragDisabled: ["Advanced App Launcher", "Favorites"],
        sortBy: "Alphabetical",
    };
};
// Convert distributed store config (for Finsemble v8.x) to app preferences config (for io.CD v10)
export const convertDistributedStoreToPrefs = (storeConfig) => {
    var _a, _b;
    const folders = {
        ...storeConfig.foundation.appFolders.folders,
    };
    // Every folder needs to have a "name" property
    for (const folderName in folders) {
        folders[folderName].name = folderName;
    }
    const tags = (_b = (_a = storeConfig.default.activeTags) !== null && _a !== void 0 ? _a : storeConfig.default.filterTags) !== null && _b !== void 0 ? _b : storeConfig.default.activeLauncherTags;
    return {
        activeFolder: storeConfig.default.activeFolder,
        activeTags: tags,
        activeLauncherTags: tags, // Backward compatibility with Finsemble v7
        dragDisabled: ["Advanced App Launcher", "Favorites"],
        folders: storeConfig.foundation.appFolders.folders,
        foldersList: storeConfig.foundation.appFolders.list,
        sortBy: storeConfig.default.sortBy,
    };
};
//# sourceMappingURL=initializeStore.js.map