import { PmNodeType } from "./../../_shared/pm-node-types.js";
import { SmartBlockShapePickerModal } from "../components/smart-block-shape-picker-modal.js";
import { DATA_HOOKS } from "../data-hooks.js";
const openCellShapePicker = (editor, cellId, referenceElement) => {
  if (!editor) {
    return;
  }
  const smartBlockExt = editor.extensionManager.extensions.find(
    (ext) => ext.name === PmNodeType.SMART_BLOCK
  );
  const services = smartBlockExt?.options?.services;
  if (!services) {
    return;
  }
  services.modals.togglePluginPanel({
    id: DATA_HOOKS.CELL_SHAPE_PICKER,
    Component: SmartBlockShapePickerModal,
    componentProps: { cellId },
    isMobile: services.context.isMobile,
    positioning: {
      referenceElement,
      placement: "bottom"
    }
  });
};
export {
  openCellShapePicker
};
//# sourceMappingURL=open-cell-shape-picker.js.map
