import { Editor, Range } from "@tiptap/core";
import { ReactNode } from "react";

//#region src/ui/slash-command/types.d.ts
type SlashCommandCategory = string;
interface SearchableItem {
  title: string;
  description: string;
  searchTerms?: string[];
}
interface SlashCommandItem extends SearchableItem {
  icon: ReactNode;
  category: SlashCommandCategory;
  command: (props: SlashCommandProps) => void;
}
interface SlashCommandProps {
  editor: Editor;
  range: Range;
}
interface SlashCommandRenderProps {
  items: SlashCommandItem[];
  query: string;
  selectedIndex: number;
  onSelect: (index: number) => void;
}
interface SlashCommandRootProps {
  items?: SlashCommandItem[];
  filterItems?: (items: SlashCommandItem[], query: string, editor: Editor) => SlashCommandItem[];
  char?: string;
  allow?: (props: {
    editor: Editor;
  }) => boolean;
  children?: (props: SlashCommandRenderProps) => ReactNode;
}
//#endregion
export { SlashCommandRootProps as a, SlashCommandRenderProps as i, SlashCommandItem as n, SlashCommandProps as r, SearchableItem as t };
//# sourceMappingURL=types-ALwc36ll.d.cts.map