'use strict';

require('../constants/index.js');
var index = require('../hooks/base/useGlobalConfig/index.js');
var method = require('../components/src/business/loginDialog/method.js');
var createRectSelect = require('../components/src/base/rectSelect/createRectSelect.js');
var version = require('./version.js');
var key = require('../constants/key.js');

const makeInstaller = (components = []) => {
  const install = (app, options) => {
    if (app[key.INSTALLED_KEY]) return;
    app[key.INSTALLED_KEY] = true;
    components.forEach((c) => app.use(c));
    index.provideGlobalConfig(options, app, true);
    if (!options.disabledLoginDialog) {
      method.createLoginDialog();
    }
    if (!options.disabledRectSelect) {
      createRectSelect.createRectSelect();
    }
    if (!options.env.SSR) {
      document?.body?.setAttribute?.("data-giime-version", version.version);
    }
  };
  return {
    version: version.version,
    install
  };
};

exports.makeInstaller = makeInstaller;
//# sourceMappingURL=makeInstaller.js.map
