import {
  ArrowLeftRight,
  ArrowLeftRightSmall,
  ArrowUpDown,
  ArrowUpDownSmall,
  Delete,
  DeleteSmall,
  Erase,
  EraseSmall,
  PaddingBottom,
  PaddingBottomSmall,
  PaddingLeft,
  PaddingLeftSmall,
  PaddingRight,
  PaddingRightSmall,
  PaddingTop,
  PaddingTopSmall
} from "@wix/wix-ui-icons-common";
import React from "react";
import { CATEGORY, LOCATION, SOURCE, TABLE_COMMANDS_KEYS } from "../../consts.js";
import { TABLE_TYPE } from "../../types.js";
import {
  CLEAR,
  DELETE_COLUMN,
  DELETE_ROW,
  DELETE_TABLE,
  DISTRIBUTE_COLUMNS,
  DISTRIBUTE_ROWS,
  INSERT_ABOVE,
  INSERT_BELOW,
  INSERT_LEFT,
  INSERT_RIGHT,
  SELECT_COLUMN
} from "./data-hooks.js";
const deleteRow = {
  key: "deleteRow",
  dataHook: DELETE_ROW,
  title: "TablePlugin_Toolbar_ContextMenu_DeleteRow_Button",
  commandKey: TABLE_COMMANDS_KEYS.DELETE_ROW,
  icon: Delete,
  iconSmall: DeleteSmall,
  publishBi: (pluginsEvents, nodeId) => pluginsEvents.publishTableDeleteColumnRow({
    pluginId: TABLE_TYPE,
    nodeId,
    category: CATEGORY.ROW
  })
};
const deleteCol = {
  key: "deleteCol",
  dataHook: DELETE_COLUMN,
  title: "TablePlugin_Toolbar_ContextMenu_DeleteCol_Button",
  commandKey: TABLE_COMMANDS_KEYS.DELETE_COLUMN,
  icon: Delete,
  iconSmall: DeleteSmall,
  publishBi: (pluginsEvents, nodeId) => pluginsEvents.publishTableDeleteColumnRow({
    pluginId: TABLE_TYPE,
    nodeId,
    category: CATEGORY.COLUMN
  })
};
const deleteTable = {
  key: "deleteTable",
  dataHook: DELETE_TABLE,
  title: "TablePlugin_Toolbar_ContextMenu_DeleteTable_Button",
  commandKey: TABLE_COMMANDS_KEYS.DELETE_TABLE,
  icon: Delete,
  iconSmall: DeleteSmall,
  publishBi: (pluginsEvents, nodeId) => pluginsEvents.publishTableDeleteColumnRow({
    pluginId: TABLE_TYPE,
    nodeId,
    category: CATEGORY.ENTIRE_TABLE
  })
};
const insertAbove = {
  key: "insertAbove",
  dataHook: INSERT_ABOVE,
  title: "TablePlugin_Toolbar_ContextMenu_InsertAbove_Button",
  commandKey: TABLE_COMMANDS_KEYS.INSERT_ABOVE,
  icon: PaddingTop,
  iconSmall: PaddingTopSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableAddRowCol({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    location: LOCATION.ABOVE,
    source: SOURCE.CONTEXT_MENU
  })
};
const insertBelow = {
  key: "insertBelow",
  dataHook: INSERT_BELOW,
  title: "TablePlugin_Toolbar_ContextMenu_InsertBelow_Button",
  commandKey: TABLE_COMMANDS_KEYS.INSERT_BELOW,
  icon: PaddingBottom,
  iconSmall: PaddingBottomSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableAddRowCol({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    location: LOCATION.BELOW,
    source: SOURCE.CONTEXT_MENU
  })
};
const insertRight = {
  key: "insertRight",
  dataHook: INSERT_RIGHT,
  title: "TablePlugin_Toolbar_ContextMenu_InsertRight_Button",
  commandKey: TABLE_COMMANDS_KEYS.INSERT_RIGHT,
  icon: PaddingRight,
  iconSmall: PaddingRightSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableAddRowCol({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    location: LOCATION.RIGHT,
    source: SOURCE.CONTEXT_MENU
  })
};
const insertLeft = {
  key: "insertLeft",
  dataHook: INSERT_LEFT,
  title: "TablePlugin_Toolbar_ContextMenu_InsertLeft_Button",
  commandKey: TABLE_COMMANDS_KEYS.INSERT_LEFT,
  icon: PaddingLeft,
  iconSmall: PaddingLeftSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableAddRowCol({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    location: LOCATION.LEFT,
    source: SOURCE.CONTEXT_MENU
  })
};
const distributeCols = {
  key: "distributeCols",
  dataHook: DISTRIBUTE_COLUMNS,
  title: "TablePlugin_Toolbar_ContextMenu_DistributeCols_Button",
  commandKey: TABLE_COMMANDS_KEYS.DISTRIBUTE_COLUMNS,
  icon: ArrowLeftRight,
  iconSmall: ArrowLeftRightSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableContextMenuOptionClick({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    actionName: TABLE_COMMANDS_KEYS.DISTRIBUTE_COLUMNS
  })
};
const distributeRows = {
  key: "distributeRows",
  dataHook: DISTRIBUTE_ROWS,
  title: "TablePlugin_Toolbar_ContextMenu_DistributeRows_Button",
  commandKey: TABLE_COMMANDS_KEYS.DISTRIBUTE_ROWS,
  icon: ArrowUpDown,
  iconSmall: ArrowUpDownSmall,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableContextMenuOptionClick({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    actionName: TABLE_COMMANDS_KEYS.DISTRIBUTE_ROWS
  })
};
const selectRows = {
  key: "selectRows",
  dataHook: DISTRIBUTE_ROWS,
  title: "TablePlugin_Toolbar_ContextMenu_SelectRow_Button",
  commandKey: TABLE_COMMANDS_KEYS.SELECT_ROWS,
  icon: React.Fragment,
  iconSmall: React.Fragment,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableContextMenuOptionClick({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    actionName: TABLE_COMMANDS_KEYS.SELECT_ROWS
  })
};
const selectCols = {
  key: "selectCols",
  dataHook: SELECT_COLUMN,
  title: "TablePlugin_Toolbar_ContextMenu_SelectCol_Button",
  commandKey: TABLE_COMMANDS_KEYS.SELECT_COLUMNS,
  icon: React.Fragment,
  iconSmall: React.Fragment,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableContextMenuOptionClick({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    actionName: TABLE_COMMANDS_KEYS.SELECT_COLUMNS
  })
};
const clear = {
  key: "clear",
  dataHook: CLEAR,
  title: "TablePlugin_Toolbar_ContextMenu_Clear_Button",
  icon: Erase,
  iconSmall: EraseSmall,
  commandKey: TABLE_COMMANDS_KEYS.CLEAR,
  publishBi: (pluginsEvents, nodeId, category) => pluginsEvents.publishTableContextMenuOptionClick({
    pluginId: TABLE_TYPE,
    nodeId,
    category,
    actionName: TABLE_COMMANDS_KEYS.CLEAR
  })
};
const INSERT_PANEL_OPTIONS = {
  [CATEGORY.ROW]: [insertAbove, insertBelow],
  [CATEGORY.COLUMN]: [insertRight, insertLeft],
  [CATEGORY.ENTIRE_TABLE]: [insertAbove, insertBelow, insertRight, insertLeft]
};
const CONTEXT_PANEL_OPTIONS = {
  [CATEGORY.ROW]: [distributeCols, "divider", clear, deleteRow],
  [CATEGORY.COLUMN]: [distributeRows, "divider", clear, deleteCol],
  [CATEGORY.ENTIRE_TABLE]: [distributeRows, distributeCols, "divider", clear, deleteTable],
  [CATEGORY.RANGE]: [distributeRows, distributeCols],
  [CATEGORY.ROW_RANGE]: [distributeRows, distributeCols],
  [CATEGORY.COLUMN_RANGE]: [distributeRows, distributeCols],
  [CATEGORY.CELL_BORDER]: [selectRows, selectCols]
};
export {
  CONTEXT_PANEL_OPTIONS,
  INSERT_PANEL_OPTIONS,
  clear
};
//# sourceMappingURL=consts.js.map
