import React, { Component } from 'react';
import { ResolveThunks } from 'react-redux';
import { JSONSchema7Definition, JSONSchema7TypeName } from 'json-schema';
import { ConnectionType, saveSocketSettings } from '../../actions';
import { StoreState } from '../../reducers';
import { ConnectionStateOptions } from '../../reducers/connection';
import { IChangeEvent, ISubmitEvent } from '@rjsf/core';
declare module 'json-schema' {
    interface JSONSchema7 {
        enumNames?: JSONSchema7Type[];
    }
}
interface Schema {
    type: JSONSchema7TypeName;
    required?: string[];
    properties: {
        [key: string]: JSONSchema7Definition;
    };
}
type StateProps = ReturnType<typeof mapStateToProps>;
type DispatchProps = ResolveThunks<typeof actionCreators>;
type Props = StateProps & DispatchProps;
interface FormData extends ConnectionStateOptions {
    readonly type: ConnectionType;
}
interface State {
    readonly formData: FormData;
    readonly type: ConnectionType;
    readonly schema: Schema;
    readonly changed: boolean | undefined;
}
export declare class Connection extends Component<Props, State> {
    setFormData: (type: ConnectionType, changed?: boolean) => {
        formData: {
            hostname: string;
            port: number;
            secure: boolean;
            type: ConnectionType;
        };
        type: ConnectionType;
        schema: Schema;
        changed: boolean | undefined;
    };
    state: State;
    shouldComponentUpdate(nextProps: Props, nextState: State): boolean;
    UNSAFE_componentWillReceiveProps(nextProps: Props): void;
    handleSave: (data: ISubmitEvent<FormData>) => void;
    handleChange: (data: IChangeEvent<FormData>) => void;
    render(): React.JSX.Element;
}
declare const mapStateToProps: (state: StoreState) => import("../../reducers/connection").ConnectionState;
declare const actionCreators: {
    saveSettings: typeof saveSocketSettings;
};
declare const _default: import("react-redux").ConnectedComponent<typeof Connection, {
    key?: React.Key | null | undefined;
    ref?: React.LegacyRef<Connection> | undefined;
    context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
    store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
}>;
export default _default;
