import { ConfigurationSubject } from '@sourcegraph/extensions-client-common/lib/settings';
import * as React from 'react';
import { Observable } from 'rxjs';
import * as GQL from '../../backend/graphqlschema';
export interface SavedQueryFields {
    description: string;
    query: string;
    subject: GQL.ID;
    showOnHomepage: boolean;
    notify: boolean;
    notifySlack: boolean;
}
interface Props {
    user: GQL.IUser | null;
    defaultValues?: Partial<SavedQueryFields>;
    title?: string;
    submitLabel: string;
    onSubmit: (fields: SavedQueryFields) => Observable<void>;
    onDidCommit: () => void;
    onDidCancel: () => void;
}
interface State {
    values: SavedQueryFields;
    subjectOptions: ConfigurationSubject[];
    isSubmitting: boolean;
    isFocused: boolean;
    error?: any;
    sawUnsupportedNotifyQueryWarning: boolean;
    slackWebhooks: Map<GQL.ID, string | null>;
}
export declare class SavedQueryForm extends React.Component<Props, State> {
    private handleDescriptionChange;
    private handleSubjectChange;
    private handleShowOnHomeChange;
    private handleNotifyChange;
    private handleNotifySlackChange;
    private subscriptions;
    constructor(props: Props);
    componentDidMount(): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
    /**
     * Tells if the query is unsupported for sending notifications.
     */
    private isUnsupportedNotifyQuery;
    private isSubjectMissingSlackWebhook;
    private getConfigureSlackURL;
    private saveTargetName;
    private handleSubmit;
    private handleInputFocus;
    private handleInputBlur;
    private handleQueryChange;
    /**
     * Returns an input change handler that updates the SavedQueryFields in the component's state
     *
     * @param key The key of saved query fields that a change of this input should update
     */
    private createInputChangeHandler;
}
export {};
//# sourceMappingURL=SavedQueryForm.d.ts.map