import { AXTranslationService } from '@acorex/core/translation';
import * as i0 from '@angular/core';
import { Injectable } from '@angular/core';

class AXMPermissionDefinitionProvider {
    constructor(injector) {
        this.injector = injector;
        this.translateService = this.injector.get(AXTranslationService);
    }
    async define(context) {
        const t = async (key) => await this.translateService.translateAsync(key);
        context
            .addGroup('party-management', await t('@party-management:module-name'))
            // Party
            .addPermission('party.management', await t('@party-management:party.plural-title'))
            .addChild('party.view', await t('@general:actions.view.permission'))
            .addChild('party.create', await t('@general:actions.create.permission'))
            .addChild('party.update', await t('@general:actions.edit.permission'))
            .addChild('party.delete', await t('@general:actions.delete.permission'))
            .endPermission()
            // Party Role
            .addPermission('party-role.management', await t('@party-management:party-role.plural-title'))
            .addChild('party-role.view', await t('@general:actions.view.permission'))
            .addChild('party-role.create', await t('@general:actions.create.permission'))
            .addChild('party-role.update', await t('@general:actions.edit.permission'))
            .addChild('party-role.delete', await t('@general:actions.delete.permission'))
            .endPermission()
            // Party Relationship
            .addPermission('party-relationship.management', await t('@party-management:party-relationship.plural-title'))
            .addChild('party-relationship.view', await t('@general:actions.view.permission'))
            .addChild('party-relationship.create', await t('@general:actions.create.permission'))
            .addChild('party-relationship.update', await t('@general:actions.edit.permission'))
            .addChild('party-relationship.delete', await t('@general:actions.delete.permission'))
            .endPermission()
            // Party Identifier
            .addPermission('party-identifier.management', await t('@party-management:party-identifier.plural-title'))
            .addChild('party-identifier.view', await t('@general:actions.view.permission'))
            .addChild('party-identifier.create', await t('@general:actions.create.permission'))
            .addChild('party-identifier.update', await t('@general:actions.edit.permission'))
            .addChild('party-identifier.delete', await t('@general:actions.delete.permission'))
            .endPermission()
            // Party Identifier Type
            .addPermission('party-identifier-type.management', await t('@party-management:party-identifier-type.plural-title'))
            .addChild('party-identifier-type.view', await t('@general:actions.view.permission'))
            .addChild('party-identifier-type.create', await t('@general:actions.create.permission'))
            .addChild('party-identifier-type.update', await t('@general:actions.edit.permission'))
            .addChild('party-identifier-type.delete', await t('@general:actions.delete.permission'))
            .endPermission()
            .endGroup();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPermissionDefinitionProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPermissionDefinitionProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPermissionDefinitionProvider, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: i0.Injector }] });

export { AXMPermissionDefinitionProvider };
//# sourceMappingURL=acorex-modules-party-management-permission-definition.provider-Devwx69n.mjs.map
