import * as i0 from '@angular/core';
import { Injectable } from '@angular/core';
import { AXMOrderManagementPermissionKeys, RootConfig } from './acorex-modules-order-management.mjs';

//#endregion
//#region ----   Permission Definition Provider   ----
class AXMOrderManagementPermissionDefinitionProvider {
    async define(context) {
        const keys = AXMOrderManagementPermissionKeys;
        // I18n path constants
        const MODULE_PERMISSIONS = '@order-management:module.permissions';
        const ORDERS_PERMISSIONS = '@order-management:orders.permissions';
        const GROUP_ORDERS_PERMISSIONS = '@order-management:group-orders.permissions';
        context
            .addGroup(RootConfig.module.name, `${MODULE_PERMISSIONS}.title`, `${MODULE_PERMISSIONS}.description`)
            // Aggregate Root: Order (Important Entity - Full CRUD)
            .addPermission(keys.Orders.Management, `${ORDERS_PERMISSIONS}.title`, `${ORDERS_PERMISSIONS}.description`)
            .addChild(keys.Orders.View, `${ORDERS_PERMISSIONS}.view.title`, `${ORDERS_PERMISSIONS}.view.description`)
            .addChild(keys.Orders.Create, `${ORDERS_PERMISSIONS}.create.title`, `${ORDERS_PERMISSIONS}.create.description`)
            .addChild(keys.Orders.Edit, `${ORDERS_PERMISSIONS}.edit.title`, `${ORDERS_PERMISSIONS}.edit.description`)
            .addChild(keys.Orders.Delete, `${ORDERS_PERMISSIONS}.delete.title`, `${ORDERS_PERMISSIONS}.delete.description`)
            .endPermission()
            // Aggregate Root: GroupOrder (Important Entity - Full CRUD)
            .addPermission(keys.GroupOrders.Management, `${GROUP_ORDERS_PERMISSIONS}.title`, `${GROUP_ORDERS_PERMISSIONS}.description`)
            .addChild(keys.GroupOrders.View, `${GROUP_ORDERS_PERMISSIONS}.view.title`, `${GROUP_ORDERS_PERMISSIONS}.view.description`)
            .addChild(keys.GroupOrders.Create, `${GROUP_ORDERS_PERMISSIONS}.create.title`, `${GROUP_ORDERS_PERMISSIONS}.create.description`)
            .addChild(keys.GroupOrders.Edit, `${GROUP_ORDERS_PERMISSIONS}.edit.title`, `${GROUP_ORDERS_PERMISSIONS}.edit.description`)
            .addChild(keys.GroupOrders.Delete, `${GROUP_ORDERS_PERMISSIONS}.delete.title`, `${GROUP_ORDERS_PERMISSIONS}.delete.description`)
            .addChild(keys.GroupOrders.MemberView, `${GROUP_ORDERS_PERMISSIONS}.member-view.title`, `${GROUP_ORDERS_PERMISSIONS}.member-view.description`)
            .endPermission()
            .endGroup();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementPermissionDefinitionProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementPermissionDefinitionProvider, decorators: [{
            type: Injectable
        }] });

export { AXMOrderManagementPermissionDefinitionProvider };
//# sourceMappingURL=acorex-modules-order-management-permission-definition.provider-BHAiUDxR.mjs.map
