import { Quote, QuoteSmall } from "@wix/wix-ui-icons-common";
import { BLOCKQUOTE } 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 { isQuoteInSelection } from "./../../_shared/resolvers/is-quote-in-selection.js";
import { blockquoteConverter } from "./blockquote-converter.js";
import { TEXT_BUTTON_BLOCKQUOTE } from "./data-hooks.js";
import { blockquote } from "./extension.js";
const pluginBlockquote = {
  type: Node_Type.BLOCKQUOTE,
  config: {},
  pmMarkConverters: [],
  pmNodeConverters: [blockquoteConverter],
  tiptapExtensions: [blockquote],
  shortcuts: [
    createShortcut({
      name: Node_Type.BLOCKQUOTE,
      description: "ShortcutsSheet_Formatting_Quote",
      keys: { macOs: "Meta+Shift+9", windows: "Ctrl+Shift+9" },
      command({ publicCommands }) {
        publicCommands.setBlockType(BLOCKQUOTE);
        return "continue";
      },
      group: "ShortcutsSheet_Section_Formatting",
      enabled: true,
      showInShortcutSheet: true
    })
  ],
  textButtons: [
    {
      id: Node_Type.BLOCKQUOTE,
      type: "toggle",
      presentation: {
        dataHook: TEXT_BUTTON_BLOCKQUOTE,
        tooltip: "QuoteButton_Tooltip",
        icon: Quote
      },
      attributes: {
        visible: isAlwaysVisible,
        active: isQuoteInSelection,
        disabled: isNodeOrCaptionSelected
      },
      command: ({ publicCommands }) => () => {
        publicCommands.setBlockType(BLOCKQUOTE);
        return true;
      }
    }
  ],
  getQuickActions: ({ pluginServices }) => [
    {
      id: Node_Type.BLOCKQUOTE,
      title: "QuickActionsPlugin_ActionTitle_Quote",
      icon: pluginServices?.context.isMobile ? Quote : QuoteSmall,
      section: quickActionsModalSections.FormatLayout,
      tags: ["quote", "text highlight", "citation", "reference", "highlight", "saying", "excerpt"],
      command: ({ publicCommands }) => publicCommands.setBlockType(BLOCKQUOTE)
    }
  ]
};
export {
  pluginBlockquote
};
//# sourceMappingURL=blockquote.js.map
