import { importShared } from './__federation_fn_import-BLFDCY-V.js';
import { a as createAuthPluginDefinitionSchema } from './plugin-definition-DJzXScRp.js';

const {authConfigSpec,createPluginModule,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
const common = createPluginModule({
  name: "common",
  dependencies: {
    pluginConfig: pluginConfigSpec,
    authConfig: authConfigSpec
  },
  initialize: ({ authConfig, pluginConfig }, { pluginKey }) => {
    pluginConfig.schemas.set(pluginKey, createAuthPluginDefinitionSchema);
    authConfig.getAuthConfig.set((definition) => {
      const pluginConfig2 = PluginUtils.configByKeyOrThrow(
        definition,
        pluginKey
      );
      return {
        roles: pluginConfig2.roles,
        modelNames: {
          user: pluginConfig2.authFeatureRef
        }
      };
    });
  }
});

export { common as default };
//# sourceMappingURL=__federation_expose_authCoreCommon-CIVhaGqo.js.map
