import TUIPersonServer from './server';
import TUIPersonComponent from './index.vue';

const install = (app: any) => {
  TUIPersonComponent.TUIServer = TUIGroup.server;
  app.component(TUIGroup.name, TUIPersonComponent);
};

const plugin = (TUICore: any) => {
  (TUIGroup.server as any) = new TUIPersonServer(TUICore);
  TUICore.component(TUIGroup.name, TUIGroup);
  return TUIGroup;
};

const TUIGroup = {
  name: 'TUIPerson',
  component: TUIPersonComponent,
  server: TUIPersonServer,
  install,
  plugin
};

export default TUIGroup;
