import { CODE_BLOCK_TYPE } from "./../ricos-content/index.js";
import { Node_Type } from "./../ricos-types/index.js";
import { isAlwaysVisible } from "./../_shared/resolvers/is-always-visible.js";
import { isCodeBlockInSelection } from "./../_shared/resolvers/is-codeblock-in-selection.js";
import { isNodeOrCaptionSelected } from "./../_shared/resolvers/is-node-or-caption-selected.js";
import { TEXT_BUTTON_CODE_BLOCK } from "./data-hooks.js";
import { CodeBlockIcon } from "./icons/toolbars-v3/code-block-icon.js";
const getTextButtons = () => {
  return [
    {
      id: Node_Type.CODE_BLOCK,
      type: "toggle",
      presentation: {
        dataHook: TEXT_BUTTON_CODE_BLOCK,
        tooltip: "TextCodeBlockButton_Tooltip",
        tooltipShortcut: {
          MacOS: " (⌘⇧C)",
          Windows: " (Ctrl+⇧+C)"
        },
        icon: CodeBlockIcon
      },
      attributes: {
        visible: isAlwaysVisible,
        active: isCodeBlockInSelection,
        disabled: isNodeOrCaptionSelected
      },
      command: ({ publicCommands }) => () => {
        publicCommands.setBlockType(CODE_BLOCK_TYPE);
        return true;
      }
    }
  ];
};
export {
  getTextButtons
};
//# sourceMappingURL=get-text-buttons.js.map
