import { AXTranslationService } from '@acorex/core/translation';
import { A as AXMPermissionsKeys } from './acorex-modules-form-template-management-acorex-modules-form-template-management-DCKQMU5_.mjs';

class AXMPermissionDefinitionProvider {
    constructor(injector) {
        this.injector = injector;
        this.translateService = this.injector.get(AXTranslationService);
    }
    async define(context) {
        const trans = async (key) => await this.translateService.translateAsync(`permissions.form-template.${key}`, { scope: 'form-template-management' });
        const keys = AXMPermissionsKeys.FormTemplate;
        context.addGroup(keys.Management, await trans('manage.title'))
            //  
            .addPermission(keys.Templates.Management, await trans('templates.manage.title'))
            .addChild(keys.Templates.View, await trans('templates.view.title'))
            .addChild(keys.Templates.Edit, await trans('templates.edit.title'))
            .addChild(keys.Templates.Delete, await trans('templates.delete.title'))
            .addChild(keys.Templates.Create, await trans('templates.create.title'))
            .endPermission()
            //
            .addPermission(keys.Categories.Management, await trans('categories.manage.title'))
            .addChild(keys.Categories.View, await trans('categories.view.title'))
            .addChild(keys.Categories.Edit, await trans('categories.edit.title'))
            .addChild(keys.Categories.Delete, await trans('categories.delete.title'))
            .addChild(keys.Categories.Create, await trans('categories.create.title'))
            .endPermission();
    }
}

export { AXMPermissionDefinitionProvider };
//# sourceMappingURL=acorex-modules-form-template-management-permission-definition.provider-BSARsii9.mjs.map
