import "./styles/index.css";
import * as allcomponents from "./components";
import { Toast, Auth, Modal, Payment } from "./plugins";
export default function install(app) {
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  const components = options.components || allcomponents;
  for (const key in components) {
    app.component(key, components[key]);
  }
  app.use(Toast, {
    container: options.container,
    ...options.toast
  });
  app.use(Auth, {
    container: options.container,
    ...options.auth
  });
  app.use(Modal, {
    container: options.container,
    ...options.modal
  });
  app.use(Payment, {
    container: options.container,
    ...options.payment
  });
}