import * as platejs from 'platejs';
import { SlateEditor, ElementEntry, EditorNodesOptions, Path, PluginConfig, OmitFirst, OverrideEditor, NodeEntry, Descendant, TLocation, Point, TRange, TElement, Ancestor } from 'platejs';
export { B as BaseTodoListPlugin, T as TTodoListItemElement } from './BaseTodoListPlugin-CjzKTmKi.js';

declare const indentListItems: (editor: SlateEditor) => void;

type InsertListItemOptions = {
    inheritCheckStateOnLineEndBreak?: boolean;
    inheritCheckStateOnLineStartBreak?: boolean;
};
/** Insert list item if selection in li>p. TODO: test */
declare const insertListItem: (editor: SlateEditor, options?: InsertListItemOptions) => boolean;

/** Insert todo list item if selection in li>p. TODO: test */
declare const insertTodoListItem: (editor: SlateEditor) => boolean;

interface MoveListItemDownOptions {
    list: ElementEntry;
    listItem: ElementEntry;
}
declare const moveListItemDown: (editor: SlateEditor, { list, listItem }: MoveListItemDownOptions) => false | undefined;

interface MoveListItemSublistItemsToListItemSublistOptions {
    /** The list item to merge. */
    fromListItem: ElementEntry;
    /** The list item where to merge. */
    toListItem: ElementEntry;
    /** Move to the start of the list instead of the end. */
    start?: boolean;
}
/**
 * Move fromListItem sublist list items to the end of `toListItem` sublist. If
 * there is no `toListItem` sublist, insert one.
 */
declare const moveListItemSublistItemsToListItemSublist: (editor: SlateEditor, { fromListItem, start, toListItem, }: MoveListItemSublistItemsToListItemSublistOptions) => boolean;

interface MoveListItemUpOptions {
    list: ElementEntry;
    listItem: ElementEntry;
}
/** Move a list item up. */
declare const moveListItemUp: (editor: SlateEditor, { list, listItem }: MoveListItemUpOptions) => boolean;

type MoveListItemsOptions = {
    at?: EditorNodesOptions['at'];
    enableResetOnShiftTab?: boolean;
    increase?: boolean;
};
declare const moveListItems: (editor: SlateEditor, { at, enableResetOnShiftTab, increase, }?: MoveListItemsOptions) => boolean | undefined;

interface MergeListItemIntoListOptions {
    /**
     * Delete `fromListItem` sublist if true.
     *
     * @default true
     */
    deleteFromList?: boolean;
    /** List items of the list will be moved. */
    fromList?: ElementEntry;
    /** List items of the sublist of this node will be moved. */
    fromListItem?: ElementEntry;
    fromStartIndex?: number;
    to?: Path;
    /** List items will be moved in this list. */
    toList?: ElementEntry;
    /** List position where to move the list items. */
    toListIndex?: number | null;
}
/**
 * Move the list items of the sublist of `fromListItem` to `toList` (if
 * `fromListItem` is defined). Move the list items of `fromList` to `toList` (if
 * `fromList` is defined).
 */
declare const moveListItemsToList: (editor: SlateEditor, { deleteFromList, fromList, fromListItem, fromStartIndex, to: _to, toList, toListIndex, }: MergeListItemIntoListOptions) => boolean;

declare const moveListSiblingsAfterCursor: (editor: SlateEditor, { at, to, }: {
    at: Path;
    to: Path;
}) => false | void;

/** If list is not nested and if li is not the first child, move li up. */
declare const removeFirstListItem: (editor: SlateEditor, { list, listItem, }: {
    list: ElementEntry;
    listItem: ElementEntry;
}) => boolean;

interface RemoveListItemOptions {
    list: ElementEntry;
    listItem: ElementEntry;
    reverse?: boolean;
}
/** Remove list item and move its sublist to list if any. */
declare const removeListItem: (editor: SlateEditor, { list, listItem, reverse }: RemoveListItemOptions) => boolean;

declare const toggleList: (editor: SlateEditor, { type }: {
    type: string;
}) => boolean;
declare const toggleBulletedList: (editor: SlateEditor) => boolean;
declare const toggleTaskList: (editor: SlateEditor, defaultChecked?: boolean) => boolean;
declare const toggleNumberedList: (editor: SlateEditor) => boolean;

type UnindentListItemsOptions = Omit<MoveListItemsOptions, 'increase'>;
declare const unindentListItems: (editor: SlateEditor, options?: UnindentListItemsOptions) => boolean | undefined;

declare const unwrapList: (editor: SlateEditor, { at }?: {
    at?: Path;
}) => void;

type ListConfig = PluginConfig<'listClassic', {
    enableResetOnShiftTab?: boolean;
    /** Inherit the checked state of above node after insert break at the end */
    inheritCheckStateOnLineEndBreak?: boolean;
    /** Inherit the checked state of below node after insert break at the start */
    inheritCheckStateOnLineStartBreak?: boolean;
    /** Valid children types for list items, in addition to p and ul types. */
    validLiChildrenTypes?: string[];
}, {}, {
    toggle: {
        bulletedList: OmitFirst<typeof toggleBulletedList>;
        list: OmitFirst<typeof toggleList>;
        numberedList: OmitFirst<typeof toggleNumberedList>;
        taskList: OmitFirst<typeof toggleTaskList>;
    };
}>;
declare const BaseBulletedListPlugin: platejs.SlatePlugin<PluginConfig<"ul", {}, {}, Record<"ul", {
    toggle: () => void;
}>, {}>>;
declare const BaseNumberedListPlugin: platejs.SlatePlugin<PluginConfig<"ol", {}, {}, Record<"ol", {
    toggle: () => void;
}>, {}>>;
declare const BaseTaskListPlugin: platejs.SlatePlugin<PluginConfig<"taskList", {
    inheritCheckStateOnLineEndBreak: boolean;
    inheritCheckStateOnLineStartBreak: boolean;
}, {}, Record<"taskList", {
    toggle: () => void;
}>, {}>>;
declare const BaseListItemPlugin: platejs.SlatePlugin<PluginConfig<"li", {}, {}, {}, {}>>;
declare const BaseListItemContentPlugin: platejs.SlatePlugin<PluginConfig<"lic", {}, {}, {}, {}>>;
/** Enables support for bulleted, numbered and to-do lists. */
declare const BaseListPlugin: platejs.SlatePlugin<PluginConfig<"listClassic", {
    enableResetOnShiftTab?: boolean;
    /** Inherit the checked state of above node after insert break at the end */
    inheritCheckStateOnLineEndBreak?: boolean;
    /** Inherit the checked state of below node after insert break at the start */
    inheritCheckStateOnLineStartBreak?: boolean;
    /** Valid children types for list items, in addition to p and ul types. */
    validLiChildrenTypes?: string[];
}, {}, {
    toggle: {
        bulletedList: (() => boolean) & (() => boolean);
        list: ((args_0: {
            type: string;
        }) => boolean) & ((args_0: {
            type: string;
        }) => boolean);
        numberedList: (() => boolean) & (() => boolean);
        taskList: ((defaultChecked?: boolean | undefined) => boolean) & ((defaultChecked?: boolean | undefined) => boolean);
    };
}, {}>>;

declare const withDeleteBackwardList: OverrideEditor<ListConfig>;

declare const withDeleteForwardList: OverrideEditor<ListConfig>;

declare const withDeleteFragmentList: OverrideEditor<ListConfig>;

declare const withInsertBreakList: OverrideEditor<ListConfig>;

declare const withInsertFragmentList: OverrideEditor<ListConfig>;

declare const withList: OverrideEditor<ListConfig>;

/** Normalize list node to force the ul>li>p+ul structure. */
declare const withNormalizeList: OverrideEditor<ListConfig>;

/**
 * Recursively get all the:
 *
 * - Block children
 * - Inline children except those at excludeDepth
 */
declare const getDeepInlineChildren: (editor: SlateEditor, { children, }: {
    children: NodeEntry<Descendant>[];
}) => NodeEntry<Descendant>[];
/**
 * If the list item has no child: insert an empty list item container. Else:
 * move the children that are not valid to the list item container.
 */
declare const normalizeListItem: (editor: SlateEditor, { listItem, validLiChildrenTypes, }: {
    listItem: ElementEntry;
} & ListConfig["options"]) => boolean;

declare const normalizeNestedList: (editor: SlateEditor, { nestedListItem }: {
    nestedListItem: ElementEntry;
}) => boolean | undefined;

/**
 * Find the highest end list that can be deleted. Its path should be different
 * to diffListPath. If the highest end list 2+ items, return liPath. Get the
 * parent list until:
 *
 * - The list has less than 2 items.
 * - Its path is not equals to diffListPath.
 */
declare const getHighestEmptyList: (editor: SlateEditor, { diffListPath, liPath, }: {
    liPath: Path;
    diffListPath?: Path;
}) => Path | undefined;

/**
 * Returns the nearest li and ul / ol wrapping node entries for a given path
 * (default = selection)
 */
declare const getListItemEntry: (editor: SlateEditor, { at }?: {
    at?: TLocation | null;
}) => {
    list: ElementEntry;
    listItem: ElementEntry;
} | undefined;

/** Searches upward for the root list element */
declare const getListRoot: (editor: SlateEditor, at?: Path | Point | TRange | null) => ElementEntry | undefined;

declare const getListTypes: (editor: SlateEditor) => string[];

type GetPropsIfTaskListLiNodeOptions = {
    liNode: TElement;
    inherit?: boolean;
};
declare const getPropsIfTaskListLiNode: (editor: SlateEditor, { inherit, liNode: node }: GetPropsIfTaskListLiNodeOptions) => {
    checked: boolean;
} | undefined;
declare const getPropsIfTaskList: (editor: SlateEditor, type: string, partial?: {
    checked?: boolean;
}) => {
    checked: boolean;
} | undefined;

/**
 * Returns the nearest li and ul / ol wrapping node entries for a given path
 * (default = selection)
 */
declare const getTodoListItemEntry: (editor: SlateEditor, { at }?: {
    at?: TLocation | null;
}) => {
    list: ElementEntry;
    listItem: ElementEntry;
} | undefined;

/** Is there a list child in the node. */
declare const hasListChild: (editor: SlateEditor, node: Ancestor) => boolean;

/** Is selection across blocks with list items */
declare const isAcrossListItems: (editor: SlateEditor, at?: TRange | null) => boolean;

/** Is the list nested, i.e. its parent is a list item. */
declare const isListNested: (editor: SlateEditor, listPath: Path) => boolean;

declare const isListRoot: (editor: SlateEditor, node: Descendant) => boolean;

declare const someList: (editor: SlateEditor, type: string) => boolean;

export { BaseBulletedListPlugin, BaseListItemContentPlugin, BaseListItemPlugin, BaseListPlugin, BaseNumberedListPlugin, BaseTaskListPlugin, type GetPropsIfTaskListLiNodeOptions, type InsertListItemOptions, type ListConfig, type MergeListItemIntoListOptions, type MoveListItemDownOptions, type MoveListItemSublistItemsToListItemSublistOptions, type MoveListItemUpOptions, type MoveListItemsOptions, type RemoveListItemOptions, type UnindentListItemsOptions, getDeepInlineChildren, getHighestEmptyList, getListItemEntry, getListRoot, getListTypes, getPropsIfTaskList, getPropsIfTaskListLiNode, getTodoListItemEntry, hasListChild, indentListItems, insertListItem, insertTodoListItem, isAcrossListItems, isListNested, isListRoot, moveListItemDown, moveListItemSublistItemsToListItemSublist, moveListItemUp, moveListItems, moveListItemsToList, moveListSiblingsAfterCursor, normalizeListItem, normalizeNestedList, removeFirstListItem, removeListItem, someList, toggleBulletedList, toggleList, toggleNumberedList, toggleTaskList, unindentListItems, unwrapList, withDeleteBackwardList, withDeleteForwardList, withDeleteFragmentList, withInsertBreakList, withInsertFragmentList, withList, withNormalizeList };
