import { App } from 'vue';
import Input from './Input';
import { InputGroup } from 'ant-design-vue/es/input';
import InputPassword from './InputPassword';
import InputSearch from './InputSearch';
import Textarea from './Textarea';

import config from './config';
Input.install = (app: App, options: any = {}) => {
  // 覆盖默认配置
  Object.assign(config.props, options.props);
  app.component(Input.name, Input);

  app.component(InputGroup.name, InputGroup);
  app.component(InputSearch.name, InputSearch);
  app.component(Textarea.name, Textarea);
  app.component(InputPassword.name, InputPassword);
  return app;
};

export { InputGroup, InputSearch, Textarea, InputPassword };
export default Input;
