import { Objects } from "@wix/wix-ui-icons-common";
import { Node_Type, quickActionsModalSections } from "./../../ricos-types/index.js";
import { posToDOMRect } from "./../../tiptap/index.js";
import { ShapeSelectModal } from "../components/shape-select-modal.js";
import { SHAPE_SELECT_MODAL } from "../utils/data-hooks.js";
const getQuickActions = (config, pluginServices) => [
  {
    id: Node_Type.SHAPE,
    title: "ShapePlugin_QuickAction_Title",
    icon: Objects,
    section: quickActionsModalSections.Media,
    tags: ["shape", "vector"],
    command: ({ modalService, editor, referenceElement }) => {
      modalService.togglePluginPanel({
        id: SHAPE_SELECT_MODAL,
        Component: ShapeSelectModal,
        componentProps: {
          getShapeUrl: config.getShapeUrl
        },
        isMobile: pluginServices.context.isMobile,
        positioning: {
          referenceElement: referenceElement ?? {
            getBoundingClientRect: () => posToDOMRect(
              editor.view,
              editor.view.state.selection.from,
              editor.view.state.selection.to
            )
          },
          placement: "bottom-start"
        }
      });
    }
  }
];
export {
  getQuickActions
};
//# sourceMappingURL=get-quick-actions.js.map
