import { Node_Type } from "./../ricos-types/index.js";
const SOURCE = {
  KEYBOARD_SHORTCUT: "keyboard shortcut",
  PLUS_BUTTON: "plus button",
  CONTEXT_MENU: "context menu"
};
const LOCATION = {
  RIGHT: "right",
  LEFT: "left",
  ABOVE: "above",
  BELOW: "below"
};
const CATEGORY = {
  COLUMN: "column",
  ROW: "row",
  ENTIRE_TABLE: "entire table",
  CELL_BORDER: "cell border",
  ROW_HEADER: "row header",
  COLUMN_HEADER: "column header",
  CELL_FORMATTING: "cell formatting",
  RANGE: "range",
  ROW_RANGE: "row range",
  COLUMN_RANGE: "column range"
};
const CELL_MANUAL_MIN_WIDTH = 65;
const CELL_AUTO_MIN_WIDTH = 120;
const ROW_DEFAULT_HEIGHT = 47;
const RESIZE_HANDLE_SIZE = 5;
const ROW_RESIZE_HANDLE_SIZE = 8;
const VIEWER_CONTAINER_PADDING_Y = 24;
const TABLE_BUTTONS = {
  FORMATTING: `${Node_Type.TABLE}.formatting`,
  VERTICAL_ALIGNMENT: `${Node_Type.TABLE}.verticalAlignment`,
  INSERT: `${Node_Type.TABLE}.insert`,
  TEXT_ALIGNMENT: `${Node_Type.TABLE}.textAlignment`,
  BACKGROUND_COLOR: `${Node_Type.TABLE}.backgroundColor`,
  ROW_HEADER: `${Node_Type.TABLE}.rowHeader`,
  COLUMN_HEADER: `${Node_Type.TABLE}.columnHeader`,
  BORDER: `${Node_Type.TABLE}.border`,
  BORDER_WIDTH: `${Node_Type.TABLE}.borderWidth`,
  CONTEXT: `${Node_Type.TABLE}.contextMenu`,
  MERGE_CELLS: `${Node_Type.TABLE}.mergeCells`,
  SPLIT_CELL: `${Node_Type.TABLE}.splitCell`,
  SPACING: `${Node_Type.TABLE}.spacing`,
  MOVE_COLUMN_LEFT: `${Node_Type.TABLE}.moveColumnLeft`,
  MOVE_COLUMN_RIGHT: `${Node_Type.TABLE}.moveColumnRight`,
  MOVE_ROW_UP: `${Node_Type.TABLE}.moveRowUp`,
  MOVE_ROW_DOWN: `${Node_Type.TABLE}.moveRowDown`
};
const TABLE_BUTTONS_MODALS_ID = {
  BORDER: `${Node_Type.TABLE}.border`,
  BORDER_WIDTH: `${Node_Type.TABLE}.borderWidth`,
  VERTICAL_ALIGNMENT: `${Node_Type.TABLE}.verticalAlignment`,
  INSERT: `${Node_Type.TABLE}.insert`,
  TEXT_ALIGNMENT: "TextAlignment.modal",
  CONTEXT: `${Node_Type.TABLE}.contextMenu`,
  SPACING: `${Node_Type.TABLE}.spacing`
};
const TABLE_COMMANDS_KEYS = {
  CLEAR: "clearCell",
  DELETE_TABLE: "deleteTable",
  DELETE_ROW: "deleteRow",
  DELETE_COLUMN: "deleteColumn",
  INSERT_ABOVE: "addRowBefore",
  INSERT_BELOW: "addRowAfter",
  INSERT_LEFT: "addColumnBefore",
  INSERT_RIGHT: "addColumnAfter",
  MERGE_CELLS: "mergeCells",
  SPLIT_CELL: "splitCell",
  DISTRIBUTE_ROWS: "distributeRows",
  DISTRIBUTE_COLUMNS: "distributeColumns",
  SELECT_ROWS: "selectRow",
  SELECT_COLUMNS: "selectColumn"
};
const TABLE_COLOR_PICKER = "table-colorPicker";
const TABLE_BORDER_WIDTH_SLIDER = "table-borderWidthSlider";
const TABLE_SPACING_MODAL = "table-spacing-modal";
const BORDER_TYPES = {
  borders: "borders",
  outsideBorders: "outsideBorders",
  top: "top",
  right: "right",
  bottom: "bottom",
  left: "left",
  inner: "inner",
  innerHorizontal: "innerHorizontal",
  innerVertical: "innerVertical"
};
const DEFAULT_BORDER_COLOR_VARIABLE = "var(--ricos-internal-table-border-color)";
const DEFAULT_BORDER_COLOR_FALLBACK = "#D3D3D3";
const resolveDisplayedBorderColor = (color, defaultBorderColor) => !color || color === DEFAULT_BORDER_COLOR_VARIABLE ? defaultBorderColor : color;
const resolveDefaultBorderColor = (editorDom) => {
  const tableContainer = editorDom.querySelector("[data-table-container]");
  if (!tableContainer) {
    return DEFAULT_BORDER_COLOR_FALLBACK;
  }
  const resolved = getComputedStyle(tableContainer).getPropertyValue("--ricos-internal-table-border-color").trim();
  return resolved || DEFAULT_BORDER_COLOR_FALLBACK;
};
export {
  BORDER_TYPES,
  CATEGORY,
  CELL_AUTO_MIN_WIDTH,
  CELL_MANUAL_MIN_WIDTH,
  LOCATION,
  RESIZE_HANDLE_SIZE,
  ROW_DEFAULT_HEIGHT,
  ROW_RESIZE_HANDLE_SIZE,
  SOURCE,
  TABLE_BORDER_WIDTH_SLIDER,
  TABLE_BUTTONS,
  TABLE_BUTTONS_MODALS_ID,
  TABLE_COLOR_PICKER,
  TABLE_COMMANDS_KEYS,
  TABLE_SPACING_MODAL,
  VIEWER_CONTAINER_PADDING_Y,
  resolveDefaultBorderColor,
  resolveDisplayedBorderColor
};
//# sourceMappingURL=consts.js.map
