import * as React from 'react';
import { map } from 'rxjs/operators';
import { createSavedQuery } from '../backend';
import { SavedQueryForm } from './SavedQueryForm';
const onSubmit = (fields) => createSavedQuery({ id: fields.subject }, fields.description, fields.query, fields.showOnHomepage, fields.notify, fields.notifySlack).pipe(map(() => undefined));
export const SavedQueryCreateForm = props => (React.createElement(SavedQueryForm, { user: props.user, onDidCommit: props.onDidCreate, onDidCancel: props.onDidCancel, title: "Add a new search", submitLabel: "Create", defaultValues: props.subject ? { subject: props.subject.id } : props.values, onSubmit: onSubmit }));
//# sourceMappingURL=SavedQueryCreateForm.js.map