import * as vscode from 'vscode';

export namespace contexts {
	export const VIEWED_FILES = 'coding:viewedFiles';
	export const UNVIEWED_FILES = 'coding:unviewedFiles';
	export const IN_REVIEW_MODE = 'coding:inReviewMode';
	export const REPOS_NOT_IN_REVIEW_MODE = 'coding:reposNotInReviewMode';
	export const REPOS_IN_REVIEW_MODE = 'coding:reposInReviewMode';
}

export namespace commands {
	export function executeCommand(command: string, arg1?: any, arg2?: any) {
		return vscode.commands.executeCommand(command, arg1, arg2);
	}

	export function focusView(viewId: string) {
		return executeCommand(`${viewId}.focus`);
	}

	export function setContext(context: string, value: any) {
		return executeCommand('setContext', context, value);
	}
}
