
import { SyncResource, SyncStatus } from '../../../../platform/userDataSync/common/userDataSync.js';
import { RawContextKey, ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
import { localize, localize2 } from '../../../../nls.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
import { Categories } from '../../../../platform/action/common/actionCommonCategories.js';

function getSyncAreaLabel(source) {
    switch (source) {
    case SyncResource.Settings:
        return localize(16609, "Settings");
    case SyncResource.Keybindings:
        return localize(16610, "Keyboard Shortcuts");
    case SyncResource.Snippets:
        return localize(16611, "Snippets");
    case SyncResource.Prompts:
        return localize(16612, "Prompts and Instructions");
    case SyncResource.Tasks:
        return localize(16613, "Tasks");
    case SyncResource.Mcp:
        return localize(16614, "MCP Servers");
    case SyncResource.Extensions:
        return localize(16615, "Extensions");
    case SyncResource.GlobalState:
        return localize(16616, "UI State");
    case SyncResource.Profiles:
        return localize(16617, "Profiles");
    case SyncResource.WorkspaceState:
        return localize(16618, "Workspace State");
    }
}
var AccountStatus;
(function(AccountStatus) {
    AccountStatus["Uninitialized"] = "uninitialized";
    AccountStatus["Unavailable"] = "unavailable";
    AccountStatus["Available"] = "available";
})(AccountStatus || (AccountStatus = {}));
const SYNC_TITLE = ( localize2(16619, "Settings Sync"));
const SYNC_VIEW_ICON = registerIcon("settings-sync-view-icon", Codicon.sync, ( localize(16620, "View icon of the Settings Sync view.")));
const CONTEXT_SYNC_STATE = ( new RawContextKey("syncStatus", SyncStatus.Uninitialized));
const CONTEXT_SYNC_ENABLEMENT = ( new RawContextKey("syncEnabled", false));
const CONTEXT_ACCOUNT_STATE = ( new RawContextKey("userDataSyncAccountStatus", AccountStatus.Uninitialized));
const CONTEXT_ENABLE_ACTIVITY_VIEWS = ( new RawContextKey(`enableSyncActivityViews`, false));
const CONTEXT_ENABLE_SYNC_CONFLICTS_VIEW = ( new RawContextKey(`enableSyncConflictsView`, false));
const CONTEXT_HAS_CONFLICTS = ( new RawContextKey("hasConflicts", false));
const CONFIGURE_SYNC_COMMAND_ID = "workbench.userDataSync.actions.configure";
const SHOW_SYNC_LOG_COMMAND_ID = "workbench.userDataSync.actions.showLog";
const SYNC_VIEW_CONTAINER_ID = "workbench.view.sync";
const SYNC_CONFLICTS_VIEW_ID = "workbench.views.sync.conflicts";
const DOWNLOAD_ACTIVITY_ACTION_DESCRIPTOR = {
    id: "workbench.userDataSync.actions.downloadSyncActivity",
    title: ( localize2(16621, "Download Settings Sync Activity")),
    category: Categories.Developer,
    f1: true,
    precondition: ( ContextKeyExpr.and(( CONTEXT_ACCOUNT_STATE.isEqualTo(AccountStatus.Available)), ( CONTEXT_SYNC_STATE.notEqualsTo(SyncStatus.Uninitialized))))
};

export { AccountStatus, CONFIGURE_SYNC_COMMAND_ID, CONTEXT_ACCOUNT_STATE, CONTEXT_ENABLE_ACTIVITY_VIEWS, CONTEXT_ENABLE_SYNC_CONFLICTS_VIEW, CONTEXT_HAS_CONFLICTS, CONTEXT_SYNC_ENABLEMENT, CONTEXT_SYNC_STATE, DOWNLOAD_ACTIVITY_ACTION_DESCRIPTOR, SHOW_SYNC_LOG_COMMAND_ID, SYNC_CONFLICTS_VIEW_ID, SYNC_TITLE, SYNC_VIEW_CONTAINER_ID, SYNC_VIEW_ICON, getSyncAreaLabel };
