import { importShared } from './__federation_fn_import-C_QCk5FX.js';
import { a as createAuthPluginDefinitionSchema } from './plugin-definition-_slrOM0G.js';

const {authConfigSpec,createPlatformPluginExport,pluginConfigSpec,PluginUtils} = await importShared('@baseplate-dev/project-builder-lib');
const common = createPlatformPluginExport({
  dependencies: {
    config: pluginConfigSpec
  },
  exports: {
    authConfig: authConfigSpec
  },
  initialize: ({ config }, { pluginKey }) => {
    config.registerSchemaCreator(pluginKey, createAuthPluginDefinitionSchema);
    return {
      authConfig: {
        getAuthRoles: (definition) => {
          const pluginConfig = PluginUtils.configByKeyOrThrow(
            definition,
            pluginKey
          );
          return pluginConfig.roles;
        }
      }
    };
  }
});

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