import type { CommonInputProps } from 'rc-input/lib/interface'; import type { TextAreaProps } from 'rc-textarea'; import React from 'react'; import type { OptionProps } from './Option'; import Option from './Option'; import { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch } from './util'; type BaseTextareaAttrs = Omit; export type Placement = 'top' | 'bottom'; export type Direction = 'ltr' | 'rtl'; export interface DataDrivenOptionProps extends Omit { label?: React.ReactNode; } export interface MentionsProps extends BaseTextareaAttrs { autoFocus?: boolean; className?: string; defaultValue?: string; notFoundContent?: React.ReactNode; split?: string; style?: React.CSSProperties; transitionName?: string; placement?: Placement; direction?: Direction; prefix?: string | string[]; prefixCls?: string; value?: string; silent?: boolean; filterOption?: false | typeof defaultFilterOption; validateSearch?: typeof defaultValidateSearch; onChange?: (text: string) => void; onSelect?: (option: OptionProps, prefix: string) => void; onSearch?: (text: string, prefix: string) => void; onFocus?: React.FocusEventHandler; onBlur?: React.FocusEventHandler; getPopupContainer?: () => HTMLElement; dropdownClassName?: string; /** @private Testing usage. Do not use in prod. It will not work as your expect. */ open?: boolean; children?: React.ReactNode; options?: DataDrivenOptionProps[]; classNames?: CommonInputProps['classNames'] & { mentions?: string; }; onPopupScroll?: (event: React.UIEvent) => void; } export interface MentionsRef { focus: VoidFunction; blur: VoidFunction; /** @deprecated It may not work as expected */ textarea: HTMLTextAreaElement | null; nativeElement: HTMLElement; } declare const Mentions: React.ForwardRefExoticComponent> & { Option: typeof Option; }; export default Mentions;