import { NumberListThin, NumberListThinSmall } from "@wix/wix-ui-icons-common";
import { NUMBERED_LIST_TYPE } from "./../../ricos-content/index.js";
import { Node_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { createShortcut, quickActionsModalSections } from "./../../ricos-types/index.js";
import { isAlwaysVisible } from "./../../_shared/resolvers/is-always-visible.js";
import { isNodeOrCaptionSelected } from "./../../_shared/resolvers/is-node-or-caption-selected.js";
import { isOrderedListInSelection } from "./../../_shared/resolvers/is-ordered-list-in-selection.js";
import { TEXT_BUTTON_ORDERED_LIST } from "./data-hooks.js";
import { orderedList } from "./extension.js";
import { orderedListConverter } from "./ordered-list-converter.js";
const pluginOrderedList = {
  type: Node_Type.ORDERED_LIST,
  config: {},
  pmMarkConverters: [],
  pmNodeConverters: [orderedListConverter],
  shortcuts: [
    createShortcut({
      name: Node_Type.ORDERED_LIST,
      description: "ShortcutsSheet_Formatting_NumberedList",
      keys: { macOs: "Meta+Shift+7", windows: "Ctrl+Shift+7" },
      command({ publicCommands }) {
        publicCommands.setBlockType(NUMBERED_LIST_TYPE);
        return "continue";
      },
      group: "ShortcutsSheet_Section_Formatting",
      enabled: true,
      showInShortcutSheet: true
    })
  ],
  tiptapExtensions: [orderedList],
  textButtons: [
    {
      id: Node_Type.ORDERED_LIST,
      type: "toggle",
      presentation: {
        dataHook: TEXT_BUTTON_ORDERED_LIST,
        tooltip: "OrderedListButton_Tooltip",
        icon: NumberListThin
      },
      attributes: {
        visible: isAlwaysVisible,
        active: isOrderedListInSelection,
        disabled: isNodeOrCaptionSelected
      },
      command: ({ publicCommands }) => () => {
        publicCommands.setBlockType(NUMBERED_LIST_TYPE);
        return true;
      }
    }
  ],
  getQuickActions: () => [
    {
      id: Node_Type.ORDERED_LIST,
      title: "QuickActionsPlugin_ActionTitle_NumberedList",
      icon: NumberListThinSmall,
      section: quickActionsModalSections.FormatLayout,
      tags: ["ordered", "items", "numbers", "sequence", "steps", "points"],
      command: ({ publicCommands }) => publicCommands.setBlockType(NUMBERED_LIST_TYPE)
    }
  ]
};
export {
  pluginOrderedList
};
//# sourceMappingURL=ordered-list.js.map
