import * as H from 'history'; import * as React from 'react'; import { Observable } from 'rxjs'; /** * How & whether or not to render a title input field. */ export declare enum TitleMode { /** Explicitly show a separate title input field. */ Explicit = 0, /** Implicitly use the first line of the main textarea as the title field (like Git commit messages). */ Implicit = 1, /** No title input at all, e.g. for replying to discussion threads. */ None = 2 } interface Props { location: H.Location; history: H.History; /** The label to display on the submit button. */ submitLabel: string; /** Called when the submit button is clicked. */ onSubmit: (title: string, comment: string) => Observable; /** How & whether or not to render a title input field. */ titleMode: TitleMode; /** Called when the title value changes. */ onTitleChange?: (title: string) => void; } interface State { titleInputValue: string; textArea: { textAreaValue: string; selectionStart: number; element?: HTMLElement; }; submitting: boolean; error?: Error; previewLoading?: boolean; previewHTML?: string; } export declare class DiscussionsInput extends React.PureComponent { private componentUpdates; private subscriptions; private submits; private nextSubmit; private titleInputChanges; private nextTitleInputChange; private textAreaKeyDowns; private nextTextAreaKeyDown; private textAreaChanges; private nextTextAreaChange; private tabChanges; private nextTabChange; private onBlurHandler?; private onKeyDownFilter?; private textAreaRef?; state: State; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; render(): JSX.Element | null; /** Trims the implicit title string out of the comment (e.g. textarea value). */ private trimImplicitTitle; private canSubmit; private setOnBlurHandler; private setOnKeyDownFilter; private setTextAreaValue; private setTextAreaRef; } export {}; //# sourceMappingURL=DiscussionsInput.d.ts.map