import * as React from 'react';

export type FormControlProps = {
    name: string;
    hasFormGroupContainer?: boolean;
    hasFeedbackBlock?: boolean;
    testAutomationId?: string;
} & Partial<FormControlDefaultProps> & Partial<FormControlPropsFormContext> & React.HTMLProps<{}>;

type FormControlPropsFormContext = {
  help: string;
  bsStyle: string;
  readOnly: boolean;
  onChange: (event: React.FormEvent<any>) => void;
  value: any;
}

export type FormControlDefaultProps = {
    hasFormGroupContainer: boolean;
    hasFeedbackBlock: boolean;
}

export function isIndeterminate(checked: any): boolean;

export abstract class FormControl<P extends FormControlProps> extends React.Component<P> {
    getInputDOMNode(): Element;
    focus: () => void;
    click(): void;
    abstract getValue(): any;
    outputConverter(e: React.FormEvent<HTMLInputElement>): string | React.FormEvent<HTMLInputElement>;
    inputConverter(value: string): {value: string};
    getPropsFromContext(): any;
    getSafeProps(props): any;
}