import * as React from 'react';
import {Omit} from "../typings/common";

type FilterProps =
    Omit<React.HTMLProps<Filter>, "onChange" | "onFocus">
    & {
        onChange: Function;
        testAutomationId?: string;
        wrapperClassName?: string;
        selectOnFocus?: boolean;
        onFocus?: Function;
        ariaLabel?: string;
    }
    & Partial<FilterDefaultProps>;

type FilterDefaultProps = {
    testAutomationId: string;
    wrapperClassName: string;
    selectOnFocus: boolean;
    onFocus: Function;
    ariaLabel: string | null;
};

export class Filter extends React.Component<FilterProps> {
    handleChange(event: any): void;

    focus(): void;

    onFieldFocus(event: React.FocusEvent<HTMLInputElement>): void;
}
