import { ForwardRefExoticComponent, RefAttributes } from 'react';

import Input, { InputProps } from './Input';
import TextArea from './TextArea';

interface CompoundInputProps
  extends ForwardRefExoticComponent<
    InputProps & RefAttributes<HTMLInputElement>
  > {
  TextArea: typeof TextArea;
}

const CompoundInput = Input as CompoundInputProps;

CompoundInput.TextArea = TextArea;

export default CompoundInput;
