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