import * as React from 'react'; import { ExtensionsProps } from '../context'; import { ErrorLike } from '../errors'; import { ConfigurationSubject, ConfiguredSubjectOrError, Settings } from '../settings'; import { ConfiguredExtension } from './extension'; declare const LOADING: 'loading'; interface Props extends ExtensionsProps { /** The extension that this button adds. */ extension: ConfiguredExtension; /** The configuration subject that this button adds the extension for. */ subject: ConfiguredSubjectOrError; disabled?: boolean; className?: string; /** * Called to confirm the primary action. If the callback returns false, the action is not * performed. */ confirm?: () => boolean; /** Called when the component performs an update that requires the parent component to refresh data. */ onUpdate: () => void; } interface State { /** The operation's status: null when done or not started, 'loading', or an error. */ operationResultOrError: typeof LOADING | null | ErrorLike; } /** An button to add an extension. */ export declare class ExtensionAddButton extends React.PureComponent, State> { state: State; private clicks; private subscriptions; componentDidMount(): void; componentWillUnmount(): void; render(): JSX.Element | null; private onClick; private addExtensionForSubject; } export {};