import { ContemberEditor } from "../../../ContemberEditor/index.js";
import { OrderedListRenderer } from "./OrderedListRenderer.js";
import { getParentListElement } from "./ListElement.js";
import { unorderedListElementType } from "./UnorderedListElement.js";
import { toggleListElement } from "./transforms/toggleListElement.js";
import { normalizeListElement } from "./transforms/normalizeListElement.js";
const orderedListElementType = "orderedList";
const isOrderedListElement = (element, suchThat) => ContemberEditor.isElementType(element, orderedListElementType, suchThat);
const orderedListElementPlugin = {
  type: orderedListElementType,
  render: OrderedListRenderer,
  isActive: ({ editor, suchThat }) => {
    const list = getParentListElement(editor);
    return list ? isOrderedListElement(list, suchThat) : false;
  },
  toggleElement: ({ editor, suchThat }) => {
    toggleListElement(editor, orderedListElementType, suchThat, unorderedListElementType);
  },
  normalizeNode: normalizeListElement
};
export { isOrderedListElement, orderedListElementPlugin, orderedListElementType };
//# sourceMappingURL=OrderedListElement.js.map
