import React from 'react';
import IconInput from './input-icon';
import PasswordInput from './input-password';
import connect from "../connect";

export interface Props {
  type: 'icon' | 'password';
}

const TplInput: React.FC<Props> = ({ type }) => {
  if (type === 'icon') return <IconInput />;
  if (type === 'password') return <PasswordInput />;
  return null;
};

export default connect(TplInput, {}, {
  'icon': (IconInput as any).default,
  'password': (PasswordInput as any).default,
});
