import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import * as GQL from '../backend/graphqlschema';
import { ExtensionsProps } from '../extensions/ExtensionsClientCommonContext';
import { ErrorLike } from '../util/errors';
/** Props shared by SettingsArea and its sub-pages. */
interface SettingsAreaPageCommonProps extends ExtensionsProps {
    /** The subject whose settings to edit. */
    subject: Pick<GQL.ConfigurationSubject, '__typename' | 'id'>;
    /**
     * The currently authenticated user, NOT (necessarily) the user who is the subject of the page.
     */
    authenticatedUser: GQL.IUser | null;
    isLightTheme: boolean;
}
interface SettingsData {
    subjects: GQL.IConfigurationCascade['subjects'];
    settingsJSONSchema: {
        $id: string;
    };
}
/** Properties passed to all pages in the settings area. */
export interface SettingsAreaPageProps extends SettingsAreaPageCommonProps {
    /** The settings data, or null if the subject has no settings yet. */
    data: SettingsData;
    /** Called when the page updates the subject's settings. */
    onUpdate: () => void;
}
interface Props extends SettingsAreaPageCommonProps, RouteComponentProps<{}> {
    extraHeader?: JSX.Element;
}
declare const LOADING: 'loading';
interface State {
    /**
     * The data, loading, or an error.
     */
    dataOrError: typeof LOADING | SettingsData | ErrorLike;
}
/**
 * A settings area with a top-level JSON editor and sub-pages for editing nested settings values.
 */
export declare class SettingsArea extends React.Component<Props, State> {
    state: State;
    private subjectChanges;
    private refreshRequests;
    private subscriptions;
    componentDidMount(): void;
    componentWillReceiveProps(props: Props): void;
    componentWillUnmount(): void;
    render(): JSX.Element | null;
    private onUpdate;
    private getMergedSettingsJSONSchema;
}
export {};
//# sourceMappingURL=SettingsArea.d.ts.map