import * as i0 from '@angular/core';
import { NgModule, inject, Injector } from '@angular/core';
import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex/platform/core';
import { AXP_ENTITY_DEFINITION_LOADER, entityMasterCrudActions, entityMasterRecordActions, AXPEntityService } from '@acorex/platform/layout/entity';
import { AXP_MENU_PROVIDER, createAllQueryView } from '@acorex/platform/common';
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
import { AXPWidgetsList, AXPCommonMenuKeys } from '@acorex/modules/common';
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
import { AXTranslationService } from '@acorex/core/translation';

const config = {
    i18n: 'business-core',
    module: 'BusinessCore',
};
const RootConfig = {
    config,
    module: {
        name: config.module,
        title: `@${config.i18n}:module.title`,
        icon: 'fa-light fa-building',
    },
    entities: {
        manufacturer: {
            name: 'Manufacturer',
            title: `@${config.i18n}:manufacturers.entities.manufacturer.title`,
            titlePlural: `@${config.i18n}:manufacturers.entities.manufacturer.plural`,
            icon: 'fa-light fa-industry',
        },
        industry: {
            name: 'Industry',
            title: `@${config.i18n}:industries.entities.industry.title`,
            titlePlural: `@${config.i18n}:industries.entities.industry.plural`,
            icon: 'fa-light fa-chart-line',
        },
        businessType: {
            name: 'BusinessType',
            title: `@${config.i18n}:business-types.entities.business-type.title`,
            titlePlural: `@${config.i18n}:business-types.entities.business-type.plural`,
            icon: 'fa-light fa-briefcase',
        },
        businessStatus: {
            name: 'BusinessStatus',
            title: `@${config.i18n}:business-statuses.entities.business-status.title`,
            titlePlural: `@${config.i18n}:business-statuses.entities.business-status.plural`,
            icon: 'fa-light fa-circle-check',
        },
        partyType: {
            name: 'PartyType',
            title: `@${config.i18n}:party-types.entities.party-type.title`,
            titlePlural: `@${config.i18n}:party-types.entities.party-type.plural`,
            icon: 'fa-light fa-tag',
        },
        partySegment: {
            name: 'PartySegment',
            title: `@${config.i18n}:party-segments.entities.party-segment.title`,
            titlePlural: `@${config.i18n}:party-segments.entities.party-segment.plural`,
            icon: 'fa-light fa-chart-pie',
        },
        lifecycleStage: {
            name: 'LifecycleStage',
            title: `@${config.i18n}:lifecycle-stages.entities.lifecycle-stage.title`,
            titlePlural: `@${config.i18n}:lifecycle-stages.entities.lifecycle-stage.plural`,
            icon: 'fa-light fa-timeline',
        },
    },
};

//#region ----   Imports   ----
//#endregion
//#region ----   Manifest Definition   ----
/**
 * Business Core Module Manifest.
 * Defines module metadata and dependencies.
 */
const BusinessCoreManifest = {
    name: RootConfig.module.name,
    version: '1.0.0',
    title: RootConfig.module.title,
    icon: RootConfig.module.icon,
    i18n: RootConfig.config.i18n,
    // Module dependencies (optional)
};
//#endregion

//#region ----   Imports   ----
//#endregion
//#region ----   Module   ----
class AXMBusinessCoreModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMBusinessCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AXMBusinessCoreModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMBusinessCoreModule, providers: [
            // Module Manifest Provider
            {
                provide: AXP_MODULE_MANIFEST_PROVIDER,
                useValue: BusinessCoreManifest,
                multi: true,
            },
            // Provider references (now using tokens)
            provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then(m => m.AXMBusinessCorePermissionDefinitionProvider)),
            provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then(m => m.AXMBusinessCoreMenuProvider)),
            provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then(m => m.AXMBusinessCoreEntityProvider)),
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMBusinessCoreModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    providers: [
                        // Module Manifest Provider
                        {
                            provide: AXP_MODULE_MANIFEST_PROVIDER,
                            useValue: BusinessCoreManifest,
                            multi: true,
                        },
                        // Provider references (now using tokens)
                        provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then(m => m.AXMBusinessCorePermissionDefinitionProvider)),
                        provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then(m => m.AXMBusinessCoreMenuProvider)),
                        provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then(m => m.AXMBusinessCoreEntityProvider)),
                    ],
                }]
        }] });

//#region ----   Industry Model   ----
//#endregion

//#region ----   Business Type Model   ----
//#endregion

//#region ----   Business Status Model   ----
//#endregion

//#region ----   Party Type Model   ----
//#endregion

//#region ----   Imports   ----
//#endregion
//#region ----   Entity Factory   ----
async function partyTypeFactory(injector) {
    const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
    const propertyLayouts = [
        { name: 'code', layout: { positions: { lg: { colSpan: 4, order: 1 } } } },
        { name: 'title', layout: { positions: { lg: { colSpan: 8, order: 2 } } } },
        { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
    ];
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.partyType.name,
        title: RootConfig.entities.partyType.title,
        icon: RootConfig.entities.partyType.icon,
        formats: {
            individual: RootConfig.entities.partyType.title,
            plural: RootConfig.entities.partyType.titlePlural,
            searchResult: {
                title: '{{ title }}',
                description: '{{ code }}',
            },
        },
        plugins: [{ name: 'history' }, { name: 'compare' }, { name: 'clone' }, { name: 'disable' }],
        groups: [{ id: 'basic-info', title: '@business-core:party-types.entities.party-type.groups.basic-info' }],
        properties: [
            {
                name: 'id',
                title: '@general:terms.common.id',
                groupId: 'basic-info',
                schema: {
                    dataType: 'uuid',
                    visible: false,
                    readonly: true,
                    unique: { enabled: true },
                },
            },
            {
                name: 'code',
                title: '@general:terms.common.code',
                groupId: 'basic-info',
                options: {
                    sort: { enabled: true },
                    filter: { advance: { enabled: true }, inline: { enabled: true } },
                },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsList.Editors.TextBox,
                        options: {
                            placeholder: '@business-core:party-types.entities.party-type.fields.code.placeholder',
                        },
                    },
                },
                validations: [{ rule: 'required' }],
            },
            {
                name: 'title',
                title: '@general:terms.common.title',
                groupId: 'basic-info',
                options: {
                    sort: { enabled: true },
                    filter: { advance: { enabled: true }, inline: { enabled: true } },
                },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsList.Editors.TextBox,
                        options: {
                            placeholder: '@business-core:party-types.entities.party-type.fields.title.placeholder',
                        },
                    },
                },
                validations: [{ rule: 'required' }],
            },
            {
                name: 'description',
                title: '@general:terms.common.description',
                groupId: 'basic-info',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsList.Editors.LargeTextBox,
                        options: {
                            rows: 3,
                            placeholder: '@business-core:party-types.entities.party-type.fields.description.placeholder',
                        },
                    },
                },
            },
        ],
        columns: [
            { name: 'code', options: { width: '120px', order: 1 } },
            { name: 'title', options: { width: '220px', order: 2 } },
        ],
        interfaces: {
            master: {
                create: {
                    sections,
                    properties: propertyLayouts,
                },
                update: {
                    sections,
                    properties: propertyLayouts,
                },
                single: {
                    title: '{{ title }}',
                    sections,
                    properties: propertyLayouts,
                    actions: [...entityMasterRecordActions()],
                },
                list: {
                    actions: [...entityMasterCrudActions()],
                    views: [
                        createAllQueryView({
                            sorts: [{ name: 'code', dir: 'asc' }],
                        }),
                    ],
                },
            },
        },
    };
    return entityDef;
}
//#endregion

var partyType_entity = /*#__PURE__*/Object.freeze({
    __proto__: null,
    partyTypeFactory: partyTypeFactory
});

//#region ----   Party Segment Model   ----
//#endregion

//#region ----   Imports   ----
//#endregion
//#region ----   Entity Factory   ----
async function partySegmentFactory(injector) {
    const sections = [
        { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },
        { id: 'appearance', layout: { positions: { lg: { colSpan: 12 } } } },
    ];
    const propertyLayouts = [
        { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
        { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
        { name: 'color', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
    ];
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.partySegment.name,
        title: RootConfig.entities.partySegment.title,
        icon: RootConfig.entities.partySegment.icon,
        formats: {
            individual: RootConfig.entities.partySegment.title,
            plural: RootConfig.entities.partySegment.titlePlural,
            searchResult: {
                title: '{{ title }}',
                description: RootConfig.module.title,
            },
        },
        plugins: [{ name: 'color' }, { name: 'archive' }],
        groups: [
            { id: 'basic-info', title: '@business-core:party-segments.entities.party-segment.groups.basic-info' },
            { id: 'appearance', title: '@general:terms.interface.appearance' },
        ],
        properties: [
            {
                name: 'id',
                title: '@general:terms.common.id',
                groupId: 'basic-info',
                schema: {
                    dataType: 'uuid',
                    visible: false,
                    readonly: true,
                    unique: { enabled: true },
                },
            },
            {
                name: 'title',
                title: '@general:terms.common.title',
                groupId: 'basic-info',
                options: {
                    sort: { enabled: true },
                    filter: { advance: { enabled: true }, inline: { enabled: true } },
                },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsList.Editors.TextBox,
                        options: {
                            placeholder: '@business-core:party-segments.entities.party-segment.fields.title.placeholder',
                        },
                    },
                },
                validations: [{ rule: 'required' }],
            },
            {
                name: 'description',
                title: '@general:terms.common.description',
                groupId: 'basic-info',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsList.Editors.LargeTextBox,
                        options: {
                            rows: 3,
                            placeholder: '@business-core:party-segments.entities.party-segment.fields.description.placeholder',
                        },
                    },
                },
            },
        ],
        columns: [
            { name: 'title', options: { width: '200px', order: 1 } },
            { name: 'description', options: { width: '280px', order: 2 } },
        ],
        interfaces: {
            master: {
                create: {
                    sections,
                    properties: propertyLayouts,
                },
                update: {
                    sections,
                    properties: propertyLayouts,
                },
                single: {
                    title: '{{ title }}',
                    sections,
                    properties: propertyLayouts,
                    actions: [...entityMasterRecordActions()],
                },
                list: {
                    actions: [...entityMasterCrudActions()],
                    views: [
                        createAllQueryView({
                            sorts: [{ name: 'title', dir: 'asc' }],
                        }),
                    ],
                },
            },
        },
    };
    return entityDef;
}
//#endregion

var partySegment_entity = /*#__PURE__*/Object.freeze({
    __proto__: null,
    partySegmentFactory: partySegmentFactory
});

async function lifecycleStageFactory(injector) {
    const i18n = RootConfig.config.i18n + ':lifecycle-stages.entities.lifecycle-stage';
    const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
    const propertyLayouts = [
        { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
        { name: 'order', layout: { positions: { lg: { colSpan: 4, order: 2 } } } },
        { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
    ];
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.lifecycleStage.name,
        title: RootConfig.entities.lifecycleStage.title,
        icon: RootConfig.entities.lifecycleStage.icon,
        formats: {
            individual: RootConfig.entities.lifecycleStage.title,
            plural: RootConfig.entities.lifecycleStage.titlePlural,
            searchResult: {
                title: '{{ title }}',
                description: RootConfig.module.title,
            },
        },
        plugins: [{ name: 'archive' }],
        groups: [{ id: 'basic-info', title: `@${i18n}.groups.basic-info` }],
        properties: [
            {
                name: 'id',
                title: '@general:terms.common.id',
                groupId: 'basic-info',
                schema: { dataType: 'uuid', visible: false, readonly: true, unique: { enabled: true } },
            },
            {
                name: 'title',
                title: `@${i18n}.fields.title.title`,
                groupId: 'basic-info',
                options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                        options: { placeholder: `@${i18n}.fields.title.placeholder` },
                    },
                },
                validations: [{ rule: 'required' }],
            },
            {
                name: 'order',
                title: `@${i18n}.fields.order.title`,
                groupId: 'basic-info',
                options: { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },
                schema: {
                    dataType: 'number',
                    interface: { type: AXPWidgetsCatalog.number, options: { placeholder: `@${i18n}.fields.order.placeholder` } },
                },
            },
            {
                name: 'description',
                title: `@${i18n}.fields.description.title`,
                groupId: 'basic-info',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.largeText,
                        options: { rows: 3, placeholder: `@${i18n}.fields.description.placeholder` },
                    },
                },
            },
        ],
        columns: [
            { name: 'title', options: { width: '200px', order: 1 } },
            { name: 'order', options: { width: '80px', order: 2 } },
            { name: 'description', options: { width: '280px', order: 3 } },
        ],
        interfaces: {
            master: {
                create: { sections, properties: propertyLayouts },
                update: { sections, properties: propertyLayouts },
                single: {
                    title: '{{ title }}',
                    sections,
                    properties: propertyLayouts,
                    actions: [...entityMasterRecordActions()],
                },
                list: {
                    actions: [...entityMasterCrudActions()],
                    views: [createAllQueryView({ sorts: [{ name: 'order', dir: 'asc' }, { name: 'title', dir: 'asc' }] })],
                },
            },
        },
    };
    return entityDef;
}

var lifecycleStage_entity = /*#__PURE__*/Object.freeze({
    __proto__: null,
    lifecycleStageFactory: lifecycleStageFactory
});

// Entity Types

//#region ----   Imports   ----
//#endregion
//#region ----   Entity Provider   ----
class AXMBusinessCoreEntityProvider {
    constructor() {
        this.injector = inject(Injector);
    }
    async get(moduleName, entityName) {
        if (moduleName !== RootConfig.module.name) {
            return null;
        }
        switch (entityName) {
            case RootConfig.entities.manufacturer.name:
                return (await import('./acorex-modules-business-core-manufacturer.entity-DhyMx-nJ.mjs')).manufacturerFactory(this.injector);
            case RootConfig.entities.industry.name:
                return (await import('./acorex-modules-business-core-industry.entity-CGNfgpMs.mjs')).industryFactory(this.injector);
            case RootConfig.entities.businessType.name:
                return (await import('./acorex-modules-business-core-business-type.entity-DEy8LvEV.mjs')).businessTypeFactory(this.injector);
            case RootConfig.entities.businessStatus.name:
                return (await import('./acorex-modules-business-core-business-status.entity-BYUneIcN.mjs')).businessStatusFactory(this.injector);
            case RootConfig.entities.partyType.name:
                return (await Promise.resolve().then(function () { return partyType_entity; })).partyTypeFactory(this.injector);
            case RootConfig.entities.partySegment.name:
                return (await Promise.resolve().then(function () { return partySegment_entity; })).partySegmentFactory(this.injector);
            case RootConfig.entities.lifecycleStage.name:
                return (await Promise.resolve().then(function () { return lifecycleStage_entity; })).lifecycleStageFactory(this.injector);
        }
        return null;
    }
    async list() {
        const m = RootConfig.module.name;
        return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
    }
}
//#endregion

var entity_provider = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMBusinessCoreEntityProvider: AXMBusinessCoreEntityProvider
});

const AXMBusinessCoreMenuKeys = {
    Root: 'business-core',
    Manufacturers: 'business-core.manufacturers',
    Divider1: 'business-core.divider-1',
    Industries: 'business-core.industries',
    BusinessTypes: 'business-core.business-types',
    BusinessStatuses: 'business-core.business-statuses',
    Divider2: 'business-core.divider-2',
    PartyTypes: 'business-core.party-types',
    PartySegments: 'business-core.party-segments',
    LifecycleStages: 'business-core.lifecycle-stages',
};

const AXMBusinessCorePermissionKeys = {
    BusinessCore: {
        Manufacturer: {
            Management: 'BusinessCore:Permission:Manufacturer.Management',
        },
        Industry: {
            Management: 'BusinessCore:Permission:Industry.Management',
        },
        BusinessType: {
            Management: 'BusinessCore:Permission:BusinessType.Management',
        },
        BusinessStatus: {
            Management: 'BusinessCore:Permission:BusinessStatus.Management',
        },
        PartyType: {
            Management: 'BusinessCore:Permission:PartyType.Management',
        },
        PartySegment: {
            Management: 'BusinessCore:Permission:PartySegment.Management',
        },
        LifecycleStage: {
            Management: 'BusinessCore:Permission:LifecycleStage.Management',
        },
    },
};

//#region ----   Imports   ----
//#endregion
//#region ----   Menu Provider   ----
class AXMBusinessCoreMenuProvider {
    constructor() {
        this.entityService = inject(AXPEntityService);
    }
    async provide(context) {
        const module = RootConfig.module;
        context.find(AXPCommonMenuKeys.Configuration).addItems([
            {
                name: AXMBusinessCoreMenuKeys.Root,
                priority: 8500,
                text: "@business-core:module.menus.root.title",
                icon: module.icon,
                policy: {
                    features: [RootConfig.module.name],
                },
                children: [
                    {
                        name: AXMBusinessCoreMenuKeys.Manufacturers,
                        text: RootConfig.entities.manufacturer.titlePlural,
                        icon: RootConfig.entities.manufacturer.icon,
                        priority: 1,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.manufacturer.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.Manufacturer.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.Divider1,
                        text: '',
                        type: 'break',
                        priority: 2,
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.Industries,
                        text: RootConfig.entities.industry.titlePlural,
                        icon: RootConfig.entities.industry.icon,
                        priority: 3,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.industry.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.Industry.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.BusinessTypes,
                        text: RootConfig.entities.businessType.titlePlural,
                        icon: RootConfig.entities.businessType.icon,
                        priority: 4,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.businessType.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.BusinessType.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.BusinessStatuses,
                        text: RootConfig.entities.businessStatus.titlePlural,
                        icon: RootConfig.entities.businessStatus.icon,
                        priority: 5,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.businessStatus.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.BusinessStatus.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.Divider2,
                        text: '',
                        type: 'break',
                        priority: 6,
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.PartyTypes,
                        text: RootConfig.entities.partyType.titlePlural,
                        icon: RootConfig.entities.partyType.icon,
                        priority: 7,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.partyType.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.PartyType.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.PartySegments,
                        text: RootConfig.entities.partySegment.titlePlural,
                        icon: RootConfig.entities.partySegment.icon,
                        priority: 8,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.partySegment.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.PartySegment.Management],
                        },
                    },
                    {
                        name: AXMBusinessCoreMenuKeys.LifecycleStages,
                        text: RootConfig.entities.lifecycleStage.titlePlural,
                        icon: RootConfig.entities.lifecycleStage.icon,
                        priority: 9,
                        path: this.entityService.withEntity(module.name, RootConfig.entities.lifecycleStage.name).createPath(),
                        policy: {
                            permissions: [AXMBusinessCorePermissionKeys.BusinessCore.LifecycleStage.Management],
                        },
                    },
                ],
            },
        ]);
    }
}
//#endregion

var menu_provider = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMBusinessCoreMenuProvider: AXMBusinessCoreMenuProvider
});

//#region ----   Imports   ----
//#endregion
//#region ----   Permission Definition Provider   ----
class AXMBusinessCorePermissionDefinitionProvider {
    constructor() {
        this.translationService = inject(AXTranslationService);
    }
    async define(context) {
        const keys = AXMBusinessCorePermissionKeys.BusinessCore;
        const moduleTitle = await this.translationService.translateAsync('@business-core:module.title');
        const manufacturerTrans = (action) => this.translationService.translateAsync(`@business-core:manufacturers.permissions.manufacturer.${action}.title`);
        const industryTrans = (action) => this.translationService.translateAsync(`@business-core:industries.permissions.industry.${action}.title`);
        const businessTypeTrans = (action) => this.translationService.translateAsync(`@business-core:business-types.permissions.business-type.${action}.title`);
        const businessStatusTrans = (action) => this.translationService.translateAsync(`@business-core:business-statuses.permissions.business-status.${action}.title`);
        const partyTypeTrans = (action) => this.translationService.translateAsync(`@business-core:party-types.permissions.party-type.${action}.title`);
        const partySegmentTrans = (action) => this.translationService.translateAsync(`@business-core:party-segments.permissions.party-segment.${action}.title`);
        const lifecycleStageTrans = (action) => this.translationService.translateAsync(`@business-core:lifecycle-stages.permissions.lifecycle-stage.${action}.title`);
        context
            .addGroup(RootConfig.module.name, moduleTitle)
            .addPermission(keys.Manufacturer.Management, await manufacturerTrans('manage'))
            .endPermission()
            .addPermission(keys.Industry.Management, await industryTrans('manage'))
            .endPermission()
            .addPermission(keys.BusinessType.Management, await businessTypeTrans('manage'))
            .endPermission()
            .addPermission(keys.BusinessStatus.Management, await businessStatusTrans('manage'))
            .endPermission()
            .addPermission(keys.PartyType.Management, await partyTypeTrans('manage'))
            .endPermission()
            .addPermission(keys.PartySegment.Management, await partySegmentTrans('manage'))
            .endPermission()
            .addPermission(keys.LifecycleStage.Management, await lifecycleStageTrans('manage'))
            .endPermission()
            .endGroup();
    }
}
//#endregion

var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMBusinessCorePermissionDefinitionProvider: AXMBusinessCorePermissionDefinitionProvider
});

// Main Module

/**
 * Generated bundle index. Do not edit.
 */

export { AXMBusinessCoreEntityProvider, AXMBusinessCoreMenuKeys, AXMBusinessCoreMenuProvider, AXMBusinessCoreModule, AXMBusinessCorePermissionDefinitionProvider, AXMBusinessCorePermissionKeys, RootConfig, lifecycleStageFactory, partySegmentFactory, partyTypeFactory };
//# sourceMappingURL=acorex-modules-business-core.mjs.map
