import * as ProsemirrorTables from 'prosemirror-tables';
// [FS][07-MAY-2020][IRAD-956]
import BlockquoteInsertNewLineCommand from './BlockquoteInsertNewLineCommand.js';
import BlockquoteToggleCommand from './BlockquoteToggleCommand.js';
import DocLayoutCommand from './DocLayoutCommand.js';
import HistoryRedoCommand from './HistoryRedoCommand.js';
import HistoryUndoCommand from './HistoryUndoCommand.js';
import HorizontalRuleCommand from './HorizontalRuleCommand.js';
import LinkSetURLCommand from './LinkSetURLCommand.js';
import ListItemInsertNewLineCommand from './ListItemInsertNewLineCommand.js';
import ListItemMergeCommand from './ListItemMergeCommand.js';
import ListSplitCommand from './ListSplitCommand.js';
import { ListToggleCommand } from './ListToggleCommand.js';
import * as MarkNames from './MarkNames.js';
import MarksClearCommand from './MarksClearCommand.js';
import PrintCommand from './PrintCommand.js';
import TableBackgroundColorCommand from './TableBackgroundColorCommand.js';
import TableBorderColorCommand from './TableBorderColorCommand.js';
import TableDetailsCommand from './TableDetailsCommand.js';
import TableInsertCommand from './TableInsertCommand.js';
import TableMergeCellsCommand from './TableMergeCellsCommand.js';
import { HeadingCommand, IndentCommand, MarkToggleCommand, TextAlignCommand, TextColorCommand, TextHighlightCommand, TextLineSpacingCommand } from '@modusoperandi/licit-ui-commands';
import TextInsertTabSpaceCommand from './TextInsertTabSpaceCommand.js';
import createCommand from './createCommand.js';
var addColumnAfter = ProsemirrorTables.addColumnAfter,
  addColumnBefore = ProsemirrorTables.addColumnBefore,
  addRowAfter = ProsemirrorTables.addRowAfter,
  addRowBefore = ProsemirrorTables.addRowBefore,
  deleteColumn = ProsemirrorTables.deleteColumn,
  deleteRow = ProsemirrorTables.deleteRow,
  deleteTable = ProsemirrorTables.deleteTable,
  goToNextCell = ProsemirrorTables.goToNextCell,
  splitCell = ProsemirrorTables.splitCell,
  toggleHeaderCell = ProsemirrorTables.toggleHeaderCell,
  toggleHeaderColumn = ProsemirrorTables.toggleHeaderColumn,
  toggleHeaderRow = ProsemirrorTables.toggleHeaderRow;
var MARK_STRONG = MarkNames.MARK_STRONG,
  MARK_EM = MarkNames.MARK_EM,
  MARK_STRIKE = MarkNames.MARK_STRIKE,
  MARK_SUPER = MarkNames.MARK_SUPER,
  MARK_SUB = MarkNames.MARK_SUB,
  MARK_UNDERLINE = MarkNames.MARK_UNDERLINE;

// Note that Firefox will, by default, add various kinds of controls to
// editable tables, even though those don't work in ProseMirror. The only way
// to turn these off is globally, which you might want to do with the
// following code:
document.execCommand('enableObjectResizing', false, 'false');
document.execCommand('enableInlineTableEditing', false, 'false');
// [FS][07-MAY-2020][IRAD-956]
export var BLOCKQUOTE_TOGGLE = new BlockquoteToggleCommand();
export var BLOCKQUOTE_INSERT_NEW_LINE = new BlockquoteInsertNewLineCommand();
export var CLEAR_FORMAT = new MarksClearCommand();
export var DOC_LAYOUT = new DocLayoutCommand();
export var EM = new MarkToggleCommand(MARK_EM);
export var H1 = new HeadingCommand(1);
export var H2 = new HeadingCommand(2);
export var H3 = new HeadingCommand(3);
export var H4 = new HeadingCommand(4);
export var H5 = new HeadingCommand(5);
export var H6 = new HeadingCommand(6);
export var HISTORY_REDO = new HistoryRedoCommand();
export var HISTORY_UNDO = new HistoryUndoCommand();
export var HR = new HorizontalRuleCommand();
export var INDENT_LESS = new IndentCommand(-1);
export var INDENT_MORE = new IndentCommand(1);
export var LINK_SET_URL = new LinkSetURLCommand();
export var LIST_ITEM_INSERT_NEW_LINE = new ListItemInsertNewLineCommand();
export var LIST_ITEM_MERGE_DOWN = new ListItemMergeCommand('down');
export var LIST_ITEM_MERGE_UP = new ListItemMergeCommand('up');
export var LIST_SPLIT = new ListSplitCommand();
export var PRINT = new PrintCommand();
export var STRIKE = new MarkToggleCommand(MARK_STRIKE);
export var STRONG = new MarkToggleCommand(MARK_STRONG);
export var SUPER = new MarkToggleCommand(MARK_SUPER);
export var SUB = new MarkToggleCommand(MARK_SUB);
export var TABLE_ADD_COLUMN_AFTER = createCommand(addColumnAfter);
export var TABLE_ADD_COLUMN_BEFORE = createCommand(addColumnBefore);
export var TABLE_ADD_ROW_AFTER = createCommand(addRowAfter);
export var TABLE_ADD_ROW_BEFORE = createCommand(addRowBefore);
export var TABLE_BACKGROUND_COLOR = new TableBackgroundColorCommand();
export var TABLE_BORDER_COLOR = new TableBorderColorCommand();
export var TABLE_DETAILS = new TableDetailsCommand();
export var TABLE_DELETE_COLUMN = createCommand(deleteColumn);
export var TABLE_DELETE_ROW = createCommand(deleteRow);
export var TABLE_DELETE_TABLE = createCommand(deleteTable);
export var TABLE_INSERT_TABLE = new TableInsertCommand();
export var TABLE_MERGE_CELLS = new TableMergeCellsCommand();
export var TABLE_MOVE_TO_NEXT_CELL = createCommand(goToNextCell(1));
export var TABLE_MOVE_TO_PREV_CELL = createCommand(goToNextCell(-1));
export var TABLE_SPLIT_ROW = createCommand(splitCell);
export var TABLE_TOGGLE_HEADER_CELL = createCommand(toggleHeaderCell);
export var TABLE_TOGGLE_HEADER_COLUMN = createCommand(toggleHeaderColumn);
export var TABLE_TOGGLE_HEADER_ROW = createCommand(toggleHeaderRow);
export var TEXT_ALIGN_CENTER = new TextAlignCommand('center');
export var TEXT_ALIGN_JUSTIFY = new TextAlignCommand('justify');
export var TEXT_ALIGN_LEFT = new TextAlignCommand('left');
export var TEXT_ALIGN_RIGHT = new TextAlignCommand('right');
export var TEXT_COLOR = new TextColorCommand();
export var TEXT_HIGHLIGHT = new TextHighlightCommand();
export var TEXT_INSERT_TAB_SPACE = new TextInsertTabSpaceCommand();
export var TEXT_LINE_SPACINGS = TextLineSpacingCommand.createGroup();
export var UL = new ListToggleCommand(false, '');
export var UNDERLINE = new MarkToggleCommand(MARK_UNDERLINE);