import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
import { PlusIcon, CaretDownIcon, CodeIcon, QuoteIcon, DividerHorizontalIcon } from '../../../../../../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.mjs';
import { LinkEditPopover } from '../link/link-edit-popover.mjs';
import { ImageEditDialog } from '../image/image-edit-dialog.mjs';
import { ToolbarSection } from '../toolbar-section.mjs';

const formatActions = [
  {
    value: "codeBlock",
    label: "Code block",
    icon: /* @__PURE__ */ jsx(CodeIcon, { className: "size-5" }),
    action: (editor) => editor.chain().focus().toggleCodeBlock().run(),
    isActive: (editor) => editor.isActive("codeBlock"),
    canExecute: (editor) => editor.can().chain().focus().toggleCodeBlock().run(),
    shortcuts: ["mod", "alt", "C"]
  },
  {
    value: "blockquote",
    label: "Blockquote",
    icon: /* @__PURE__ */ jsx(QuoteIcon, { className: "size-5" }),
    action: (editor) => editor.chain().focus().toggleBlockquote().run(),
    isActive: (editor) => editor.isActive("blockquote"),
    canExecute: (editor) => editor.can().chain().focus().toggleBlockquote().run(),
    shortcuts: ["mod", "shift", "B"]
  },
  {
    value: "horizontalRule",
    label: "Divider",
    icon: /* @__PURE__ */ jsx(DividerHorizontalIcon, { className: "size-5" }),
    action: (editor) => editor.chain().focus().setHorizontalRule().run(),
    isActive: () => false,
    canExecute: (editor) => editor.can().chain().focus().setHorizontalRule().run(),
    shortcuts: ["mod", "alt", "-"]
  }
];
const SectionFive = ({
  editor,
  activeActions = formatActions.map((action) => action.value),
  mainActionCount = 0,
  size,
  variant
}) => {
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(LinkEditPopover, { editor, size, variant }),
    /* @__PURE__ */ jsx(ImageEditDialog, { editor, size, variant }),
    /* @__PURE__ */ jsx(
      ToolbarSection,
      {
        editor,
        actions: formatActions,
        activeActions,
        mainActionCount,
        dropdownIcon: /* @__PURE__ */ jsxs(Fragment, { children: [
          /* @__PURE__ */ jsx(PlusIcon, { className: "size-5" }),
          /* @__PURE__ */ jsx(CaretDownIcon, { className: "size-5" })
        ] }),
        dropdownTooltip: "Insert elements",
        size,
        variant
      }
    )
  ] });
};
SectionFive.displayName = "SectionFive";

export { SectionFive, SectionFive as default };
