import { generateRuntimeModule } from '../../utils/index.js';
export const permissionPlugin = ({ localBasePath, }) => {
    return {
        name: 'doom-permission',
        async addRuntimeModules(config, isProd) {
            return {
                ...(await generateRuntimeModule(config.permission?.functionresources, 'permission-functionResources', config.root, localBasePath, isProd, ({ items }) => items)),
                ...(await generateRuntimeModule(config.permission?.roletemplates, 'permission-roleTemplates', config.root, localBasePath, isProd, ({ items }) => items)),
            };
        },
    };
};
