import * as React from 'react';
import * as GQL from '../backend/graphqlschema';
import { ErrorLike } from '../util/errors';
interface Props {
    /** The name of the repository. */
    repo: string;
    /** The GraphQL ID of the repository, or null if it doesn't exist. */
    repoID: GQL.ID | null;
    /** The error that occurred while (unsuccessfully) retrieving the repository, or 'disabled' if
     *  the repository is disabled.
     */
    error: ErrorLike | 'disabled';
    /** Whether the viewer is a site admin. */
    viewerCanAdminister: boolean;
    /** Called when the repository is successfully added. */
    onDidAddRepository?: () => void;
    /** Called when the repository is successfully enabled. */
    onDidUpdateRepository?: (update: Partial<GQL.IRepository>) => void;
}
interface State {
    /**
     * Whether the option to add the repository should be shown.
     */
    showAdd: boolean;
    /**
     * Whether the site admin can add this repository. undefined while loading.
     */
    canAddOrError?: boolean | ErrorLike;
    /**
     * Whether the repository was added successfully. undefined before being triggered, 'loading' while loading,
     * true if successful, and an error otherwise.
     */
    addedOrError?: true | 'loading' | ErrorLike;
    /**
     * Whether the option to enable the repository should be shown.
     */
    showEnable: boolean;
    /**
     * Whether the repository was enabled successfully. undefined before being triggered, 'loading' while loading,
     * true if successful, and an error otherwise.
     */
    enabledOrError?: true | 'loading' | ErrorLike;
}
/**
 * A page informing the user that an error occurred while trying to display the repository. It
 * attempts to present the user with actions to solve the problem.
 */
export declare class RepositoryErrorPage extends React.PureComponent<Props, State> {
    state: State;
    private componentUpdates;
    private addClicks;
    private enableClicks;
    private subscriptions;
    componentDidMount(): void;
    componentWillReceiveProps(props: Props): void;
    componentWillUnmount(): void;
    render(): JSX.Element | null;
    private addRepository;
    private enableRepository;
}
export {};
//# sourceMappingURL=RepositoryErrorPage.d.ts.map