export const CLONE_ELEMENT = 'CLONE_ELEMENT'
export const CLONE_AND_RENAME_ELEMENT = 'CLONE_AND_RENAME_ELEMENT'
export const TRANSLATE_ELEMENT = 'TRANSLATE_ELEMENT'
export const NAVIGATE_TO_SOURCE_CODE = 'NAVIGATE_TO_SOURCE_CODE'
export const REMOVE_ELEMENT = 'REMOVE_ELEMENT'
export const GENERATE_PAGE = 'GENERATE_PAGE'
export const CHANGE_GRAPHQL_ENDPOINT = 'CHANGE_GRAPHQL_ENDPOINT'
export const CHANGE_THEME = 'CHANGE_THEME'

export const FILE_WRITE = 'FILE_WRITE'
export const MULTIPLE_FILE_WRITE = 'MULTIPLE_FILE_WRITE'
export const FRONTEND_FILE_WRITE = 'FRONTEND_FILE_WRITE'
export const CHANGE_ACTIVE_FILE_PATH = 'CHANGE_ACTIVE_FILE_PATH'
export const GET_PROJECT_FROM_ARCHIVE = 'GET_PROJECT_FROM_ARCHIVE'
export const PROJECT_LOADED = 'PROJECT_LOADED'
export const BUNDLE_FILES = 'BUNDLE_FILES'
export const TRANSPILE_FILES = 'TRANSPILE_FILES'
export const TRANSPILE_SINGLE_FILE = 'TRANSPILE_SINGLE_FILE'
export const UPDATE_TRANSPILED_FILES = 'UPDATE_TRANSPILED_FILES'
export const REFRESH_IFRAME = 'REFRESH_IFRAME'
export const PERFORM_REACT_REFRESH = 'PERFORM_REACT_REFRESH'
export const IFRAME_REFRESHED = 'IFRAME_REFRESHED'
export const CONNECT_DEVTOOLS = 'CONNECT_DEVTOOLS'
export const CONNECT_ELEMENT_HIGHLIGHT = 'CONNECT_ELEMENT_HIGHLIGHT'
export const GENERATE_GRAPHQL = 'GENERATE_GRAPHQL'
export const SAVE_ZIP = 'SAVE_ZIP'
export const SHOW_USER_FEEDBACK = 'SHOW_USER_FEEDBACK'

export const BUNDLER_ERROR = 'BUNDLER_ERROR'
export const TRANSPILER_ERROR = 'TRANSPILER_ERROR'

export const SET_REPO = 'SET_REPO'

export type MessageType =
  | typeof FILE_WRITE
  | typeof FRONTEND_FILE_WRITE
  | typeof MULTIPLE_FILE_WRITE
  | typeof CHANGE_ACTIVE_FILE_PATH
  | typeof GET_PROJECT_FROM_ARCHIVE
  | typeof PROJECT_LOADED
  | typeof TRANSPILE_FILES
  | typeof TRANSPILE_SINGLE_FILE
  | typeof UPDATE_TRANSPILED_FILES
  | typeof BUNDLE_FILES
  | typeof REFRESH_IFRAME
  | typeof PERFORM_REACT_REFRESH
  | typeof IFRAME_REFRESHED
  | typeof CONNECT_DEVTOOLS
  | typeof CONNECT_ELEMENT_HIGHLIGHT
  | typeof BUNDLER_ERROR
  | typeof TRANSPILER_ERROR
  | typeof GENERATE_GRAPHQL
  | typeof SAVE_ZIP
  | typeof SHOW_USER_FEEDBACK
  | ElementHighlightMessageType

export type ElementHighlightMessageType =
  | typeof CLONE_ELEMENT
  | typeof NAVIGATE_TO_SOURCE_CODE
  | typeof REMOVE_ELEMENT
  | typeof GENERATE_PAGE
  | typeof CHANGE_GRAPHQL_ENDPOINT
  | typeof CHANGE_THEME
  | typeof TRANSLATE_ELEMENT
  | typeof CLONE_AND_RENAME_ELEMENT
