import * as H from 'history';
import * as React from 'react';
import * as GQL from '../backend/graphqlschema';
import { ErrorLike } from '../util/errors';
import * as _monacoSettingsEditorModule from './MonacoSettingsEditor';
interface Props {
    history: H.History;
    settings: GQL.ISettings | null;
    /**
     * The JSON Schema that describes the document.
     */
    jsonSchema: {
        $id: string;
    };
    /**
     * Called when the user saves changes to the settings file's contents.
     */
    onDidCommit: (lastID: number | null, contents: string) => void;
    /**
     * Called when the user discards changes to the settings file's contents.
     */
    onDidDiscard: () => void;
    /**
     * The error that occurred on the last call to the onDidCommit callback,
     * if any.
     */
    commitError?: Error;
    isLightTheme: boolean;
}
interface State {
    contents?: string;
    saving: boolean;
    /**
     * The lastID that we started editing from. If null, then no
     * previous versions of the settings exist, and we're creating them from
     * scratch.
     */
    editingLastID?: number | null;
    /** The dynamically imported MonacoSettingsEditor module, error or undefined while loading. */
    monacoSettingsEditorOrError?: typeof _monacoSettingsEditorModule | ErrorLike;
}
export declare class SettingsFile extends React.PureComponent<Props, State> {
    private componentUpdates;
    private subscriptions;
    private editor?;
    private monaco;
    constructor(props: Props);
    componentDidMount(): void;
    componentWillReceiveProps(newProps: Props): void;
    componentWillUnmount(): void;
    private readonly dirty;
    render(): JSX.Element | null;
    private monacoRef;
    private runAction;
    private getPropsSettingsContentsOrEmpty;
    private getPropsSettingsID;
    private discard;
    private onEditorChange;
    private save;
}
export {};
//# sourceMappingURL=SettingsFile.d.ts.map