
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(14078, "Settings");
        case SyncResource.Keybindings: return localize(14079, "Keyboard Shortcuts");
        case SyncResource.Snippets: return localize(14080, "Snippets");
        case SyncResource.Prompts: return localize(14081, "Prompts and Instructions");
        case SyncResource.Tasks: return localize(14082, "Tasks");
        case SyncResource.Mcp: return localize(14083, "MCP Servers");
        case SyncResource.Extensions: return localize(14084, "Extensions");
        case SyncResource.GlobalState: return localize(14085, "UI State");
        case SyncResource.Profiles: return localize(14086, "Profiles");
        case SyncResource.WorkspaceState: return localize(14087, "Workspace State");
    }
}
var AccountStatus;
(function (AccountStatus) {
    AccountStatus["Uninitialized"] = "uninitialized";
    AccountStatus["Unavailable"] = "unavailable";
    AccountStatus["Available"] = "available";
})(AccountStatus || (AccountStatus = {}));
const SYNC_TITLE = ( localize2(14088, "Settings Sync"));
const SYNC_VIEW_ICON = registerIcon('settings-sync-view-icon', Codicon.sync, ( localize(14089, '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(14090, "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 };
