"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var blockquote_exports = {};
__export(blockquote_exports, {
  pluginBlockquote: () => pluginBlockquote
});
module.exports = __toCommonJS(blockquote_exports);
var import_wix_ui_icons_common = require("@wix/wix-ui-icons-common");
var import_ricos_content = require("./../../ricos-content/index.js");
var import_v1 = require("./../../ricos-schema/legacy/wix/rich_content/v1/index.js");
var import_ricos_types = require("./../../ricos-types/index.js");
var import_is_always_visible = require("./../../_shared/resolvers/is-always-visible.js");
var import_is_node_or_caption_selected = require("./../../_shared/resolvers/is-node-or-caption-selected.js");
var import_is_quote_in_selection = require("./../../_shared/resolvers/is-quote-in-selection.js");
var import_blockquote_converter = require("./blockquote-converter.js");
var import_data_hooks = require("./data-hooks.js");
var import_extension = require("./extension.js");
const pluginBlockquote = {
  type: import_v1.Node_Type.BLOCKQUOTE,
  config: {},
  pmMarkConverters: [],
  pmNodeConverters: [import_blockquote_converter.blockquoteConverter],
  tiptapExtensions: [import_extension.blockquote],
  shortcuts: [
    (0, import_ricos_types.createShortcut)({
      name: import_v1.Node_Type.BLOCKQUOTE,
      description: "ShortcutsSheet_Formatting_Quote",
      keys: { macOs: "Meta+Shift+9", windows: "Ctrl+Shift+9" },
      command({ publicCommands }) {
        publicCommands.setBlockType(import_ricos_content.BLOCKQUOTE);
        return "continue";
      },
      group: "ShortcutsSheet_Section_Formatting",
      enabled: true,
      showInShortcutSheet: true
    })
  ],
  textButtons: [
    {
      id: import_v1.Node_Type.BLOCKQUOTE,
      type: "toggle",
      presentation: {
        dataHook: import_data_hooks.TEXT_BUTTON_BLOCKQUOTE,
        tooltip: "QuoteButton_Tooltip",
        icon: import_wix_ui_icons_common.Quote
      },
      attributes: {
        visible: import_is_always_visible.isAlwaysVisible,
        active: import_is_quote_in_selection.isQuoteInSelection,
        disabled: import_is_node_or_caption_selected.isNodeOrCaptionSelected
      },
      command: ({ publicCommands }) => () => {
        publicCommands.setBlockType(import_ricos_content.BLOCKQUOTE);
        return true;
      }
    }
  ],
  getQuickActions: ({ pluginServices }) => [
    {
      id: import_v1.Node_Type.BLOCKQUOTE,
      title: "QuickActionsPlugin_ActionTitle_Quote",
      icon: pluginServices?.context.isMobile ? import_wix_ui_icons_common.Quote : import_wix_ui_icons_common.QuoteSmall,
      section: import_ricos_types.quickActionsModalSections.FormatLayout,
      tags: ["quote", "text highlight", "citation", "reference", "highlight", "saying", "excerpt"],
      command: ({ publicCommands }) => publicCommands.setBlockType(import_ricos_content.BLOCKQUOTE)
    }
  ]
};
//# sourceMappingURL=blockquote.js.map
