// TODO sort by direction
export enum IPC {
  SHUTDOWN_NOW = 'SHUTDOWN_NOW',
  EXIT = 'EXIT',
  RELAUNCH = 'RELAUNCH',

  JIRA_CB_EVENT = 'JIRA_RESPONSE',
  JIRA_MAKE_REQUEST_EVENT = 'JIRA_MAKE_REQUEST_EVENT',
  JIRA_SETUP_IMG_HEADERS = 'JIRA_SETUP_IMG_HEADERS',
  REGISTER_GLOBAL_SHORTCUTS_EVENT = 'REGISTER_GLOBAL_SHORTCUTS',
  IDLE_TIME = 'IDLE_TIME',
  RESUME = 'RESUME',
  SUSPEND = 'SUSPEND',

  SHOW_OR_FOCUS = 'SHOW_OR_FOCUS',
  LOCK_SCREEN = 'LOCK_SCREEN',

  APP_READY = 'APP_READY',
  ERROR = 'ELECTRON_ERROR',
  CURRENT_TASK_UPDATED = 'CURRENT_TASK_UPDATED',
  REQUEST_CURRENT_TASK_FOR_TASK_WIDGET = 'REQUEST_CURRENT_TASK_FOR_TASK_WIDGET',
  TASK_TOGGLE_START = 'TASK_TOGGLE_START',
  SHOW_ADD_TASK_BAR = 'SHOW_ADD_TASK_BAR',
  ADD_TASK_FROM_APP_URI = 'ADD_TASK_FROM_APP_URI',
  ADD_NOTE = 'ADD_NOTE',
  TRANSFER_SETTINGS_REQUESTED = 'TRANSFER_SETTINGS_REQUESTED',
  TRANSFER_SETTINGS_TO_ELECTRON = 'TRANSFER_SETTINGS_TO_ELECTRON',

  BACKUP = 'BACKUP',
  BACKUP_IS_AVAILABLE = 'BACKUP_IS_AVAILABLE',
  BACKUP_LOAD_DATA = 'BACKUP_LOAD_DATA',

  SET_PROGRESS_BAR = 'SET_PROGRESS_BAR',
  FLASH_FRAME = 'FLASH_FRAME',

  NOTIFY_ON_CLOSE = 'NOTIFY_ON_CLOSE',
  REGISTER_BEFORE_CLOSE = 'REGISTER_BEFORE_CLOSE',
  UNREGISTER_BEFORE_CLOSE = 'UNREGISTER_BEFORE_CLOSE',
  BEFORE_CLOSE_DONE = 'BEFORE_CLOSE_DONE',

  FILE_SYNC_LOAD = 'FILE_SYNC_LOAD',
  FILE_SYNC_SAVE = 'FILE_SYNC_SAVE',
  FILE_SYNC_REMOVE = 'FILE_SYNC_REMOVE',
  FILE_SYNC_LIST_FILES = 'FILE_SYNC_LIST_FILES',
  FILE_SYNC_GET_REV_AND_CLIENT_UPDATE = 'FILE_SYNC_GET_REV_AND_CLIENT_UPDATE',

  CHECK_DIR_EXISTS = 'CHECK_DIR_EXISTS',
  PICK_DIRECTORY = 'PICK_DIRECTORY',
  GET_SYNC_FOLDER_PATH = 'GET_SYNC_FOLDER_PATH',
  IMAGE_PICK_AND_IMPORT = 'IMAGE_PICK_AND_IMPORT',
  IMAGE_CACHE_GET_DATA_URL = 'IMAGE_CACHE_GET_DATA_URL',
  SHOW_OPEN_DIALOG = 'SHOW_OPEN_DIALOG',

  ANY_FILE_DOWNLOADED = 'ANY_FILE_DOWNLOADED',

  FULL_SCREEN_BLOCKER = 'FULL_SCREEN_BLOCKER',
  ENTER_FULL_SCREEN = 'ENTER_FULL_SCREEN',
  LEAVE_FULL_SCREEN = 'LEAVE_FULL_SCREEN',

  GET_PATH = 'GET_PATH',
  GET_BACKUP_PATH = 'GET_BACKUP_PATH',
  RELOAD_MAIN_WIN = 'RELOAD_MAIN_WIN',
  OPEN_DEV_TOOLS = 'OPEN_DEV_TOOLS',
  SHOW_EMOJI_PANEL = 'SHOW_EMOJI_PANEL',

  OPEN_PATH = 'OPEN_PATH',
  OPEN_EXTERNAL = 'OPEN_EXTERNAL',

  SAVE_FILE_DIALOG = 'SAVE_FILE_DIALOG',

  SHARE_NATIVE = 'SHARE_NATIVE',

  // Clipboard Images
  CLIPBOARD_IMAGE_SAVE = 'CLIPBOARD_IMAGE_SAVE',
  CLIPBOARD_IMAGE_LOAD = 'CLIPBOARD_IMAGE_LOAD',
  CLIPBOARD_IMAGE_DELETE = 'CLIPBOARD_IMAGE_DELETE',
  CLIPBOARD_IMAGE_LIST = 'CLIPBOARD_IMAGE_LIST',
  CLIPBOARD_IMAGE_GET_PATH = 'CLIPBOARD_IMAGE_GET_PATH',
  CLIPBOARD_GET_FILE_PATHS = 'CLIPBOARD_GET_FILE_PATHS',
  CLIPBOARD_COPY_IMAGE_FILE = 'CLIPBOARD_COPY_IMAGE_FILE',
  CLIPBOARD_READ_IMAGE = 'CLIPBOARD_READ_IMAGE',

  // Plugin Node Execution
  PLUGIN_REQUEST_NODE_EXECUTION_GRANT = 'PLUGIN_REQUEST_NODE_EXECUTION_GRANT',
  PLUGIN_EXEC_NODE_SCRIPT = 'PLUGIN_EXEC_NODE_SCRIPT',
  PLUGIN_REVOKE_NODE_EXECUTION_GRANT = 'PLUGIN_REVOKE_NODE_EXECUTION_GRANT',
  PLUGIN_CLEAR_NODE_EXECUTION_CONSENT = 'PLUGIN_CLEAR_NODE_EXECUTION_CONSENT',

  // Plugin OAuth
  PLUGIN_OAUTH_PREPARE = 'PLUGIN_OAUTH_PREPARE',
  PLUGIN_OAUTH_START = 'PLUGIN_OAUTH_START',
  PLUGIN_OAUTH_CB = 'PLUGIN_OAUTH_CB',

  // Generic OAuth callback for app protocol redirects (e.g. OneDrive)
  OAUTH_CALLBACK = 'OAUTH_CALLBACK',

  LOCAL_REST_API_REQUEST = 'LOCAL_REST_API_REQUEST',
  LOCAL_REST_API_RESPONSE = 'LOCAL_REST_API_RESPONSE',

  UPDATE_SETTINGS = 'UPDATE_SETTINGS',
  UPDATE_TASK_WIDGET_SETTINGS = 'UPDATE_TASK_WIDGET_SETTINGS',
  UPDATE_TITLE_BAR_DARK_MODE = 'UPDATE_TITLE_BAR_DARK_MODE',

  TODAY_TASKS_UPDATED = 'TODAY_TASKS_UPDATED',
  SWITCH_TASK = 'SWITCH_TASK',

  // maybe_UPDATE_CURRENT_TASK = 'UPDATE_CURRENT_TASK',
  // maybe_IS_IDLE = 'IS_IDLE',
  // maybe_IS_BUSY = 'IS_BUSY',
  // POMODORO_UPDATE = 'POMODORO_UPDATE',
  // maybe_PROJECT_CHANGED = 'PROJECT_CHANGED',
  // maybe_COMPLETE_DATA_RELOAD = 'COMPLETE_DATA_RELOAD',
}

export type IPCEventValue = `${IPC}`;
