import * as i0 from '@angular/core';
import { inject, Injector, Injectable, NgModule } from '@angular/core';
import { AXP_MENU_PROVIDER } from '@acorex/platform/common';
import { AXPEntityService, AXMEntityCrudServiceImpl, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
import { AXP_IDENTIFIER_RULES } from '@acorex/modules/identifier-management';

const config = {
    i18n: 'customer-management',
    module: 'CustomerManagement',
};
const RootConfig = {
    config,
    module: {
        route: 'customer-management',
        name: config.module,
        title: `t('module-name', {scope:"${config.i18n}"})`,
        icon: 'fa-light fa-handshake',
    },
    entities: {
        customer: {
            name: 'Customer',
            source: `${config.module}.Customer`,
            title: `t('customer.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('customer.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-building-user',
        },
        customerType: {
            name: 'CustomerType',
            source: `${config.module}.CustomerType`,
            title: `t('customer-type.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('customer-type.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-tags',
        },
        customerSegment: {
            name: 'CustomerSegment',
            source: `${config.module}.CustomerSegment`,
            title: `t('customer-segment.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('customer-segment.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-chart-pie',
        },
        lead: {
            name: 'Lead',
            source: `${config.module}.Lead`,
            title: `t('lead.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('lead.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-user-plus',
        },
        opportunity: {
            name: 'Opportunity',
            source: `${config.module}.Opportunity`,
            title: `t('opportunity.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('opportunity.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-briefcase',
        },
        opportunityStage: {
            name: 'OpportunityStage',
            source: `${config.module}.OpportunityStage`,
            title: `t('opportunity-stage.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('opportunity-stage.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-stairs',
        },
        salesPipeline: {
            name: 'SalesPipeline',
            source: `${config.module}.SalesPipeline`,
            title: `t('sales-pipeline.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('sales-pipeline.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-diagram-project',
        },
        activity: {
            name: 'Activity',
            source: `${config.module}.Activity`,
            title: `t('activity.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('activity.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-calendar-check',
        },
        dealContactRole: {
            name: 'DealContactRole',
            source: `${config.module}.DealContactRole`,
            title: `t('deal-contact-role.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('deal-contact-role.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-users',
        },
        lifecycleStage: {
            name: 'LifecycleStage',
            source: `${config.module}.LifecycleStage`,
            title: `t('lifecycle-stage.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('lifecycle-stage.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-timeline',
        },
        salesTerritory: {
            name: 'SalesTerritory',
            source: `${config.module}.SalesTerritory`,
            title: `t('sales-territory.individual-title', {scope:"${config.i18n}"})`,
            titlePlural: `t('sales-territory.plural-title', {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-map',
        },
    },
};

class AXMCustomerManagementEntityProvider {
    constructor() {
        this.injector = inject(Injector);
    }
    preload() {
        const module = RootConfig.module.name;
        return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
            module: module,
            entity: entity.name,
        }));
    }
    async get(moduleName, entityName) {
        if (moduleName == RootConfig.module.name) {
            switch (entityName) {
                case RootConfig.entities.customer.name:
                    return (await import('./acorex-modules-customer-management-customer.entity-DP7bXPKk.mjs')).customerFactory(this.injector);
                case RootConfig.entities.customerType.name:
                    return (await import('./acorex-modules-customer-management-customer-type.entity-D3mT_QJr.mjs')).customerTypeFactory(this.injector);
                case RootConfig.entities.customerSegment.name:
                    return (await import('./acorex-modules-customer-management-customer-segment.entity-BBGMUGKB.mjs')).customerSegmentFactory(this.injector);
                case RootConfig.entities.lead.name:
                    return (await import('./acorex-modules-customer-management-lead.entity-jf7hHR9f.mjs')).leadFactory(this.injector);
                case RootConfig.entities.opportunityStage.name:
                    return (await import('./acorex-modules-customer-management-opportunity-stage.entity-CMsjW0AH.mjs')).opportunityStageFactory(this.injector);
                case RootConfig.entities.salesPipeline.name:
                    return (await import('./acorex-modules-customer-management-sales-pipeline.entity-a4gtSu3G.mjs')).salesPipelineFactory(this.injector);
                case RootConfig.entities.lifecycleStage.name:
                    return (await import('./acorex-modules-customer-management-lifecycle-stage.entity-DEJaYBkZ.mjs')).lifecycleStageFactory(this.injector);
                case RootConfig.entities.salesTerritory.name:
                    return (await import('./acorex-modules-customer-management-sales-territory.entity-DmtBAETd.mjs')).salesTerritoryFactory(this.injector);
                case RootConfig.entities.opportunity?.name:
                    return (await import('./acorex-modules-customer-management-opportunity.entity-ChNUMPQt.mjs')).opportunityFactory(this.injector);
                case RootConfig.entities.activity?.name:
                    return (await import('./acorex-modules-customer-management-activity.entity-Dt0EZWKR.mjs')).activityFactory(this.injector);
                // note entity replaced by comments plugin
                case RootConfig.entities.dealContactRole?.name:
                    return (await import('./acorex-modules-customer-management-deal-contact-role.entity-BvGlBK6A.mjs')).dealContactRoleFactory(this.injector);
            }
        }
        return null;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementEntityProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementEntityProvider, decorators: [{
            type: Injectable
        }] });

const AXPCustomerManagementMenuKeys = {
    Root: 'customer-management:menu',
    Customers: 'customer-management:menu:customers',
    Leads: 'customer-management:menu:leads',
    Opportunities: 'customer-management:menu:opportunities',
    CustomerTypes: 'customer-management:menu:customer-types',
    CustomerSegments: 'customer-management:menu:customer-segments',
    OpportunityStages: 'customer-management:menu:opportunity-stages',
    SalesPipelines: 'customer-management:menu:sales-pipelines',
    LifecycleStages: 'customer-management:menu:lifecycle-stages',
    SalesTerritories: 'customer-management:menu:sales-territories',
};

class AXMMenuProvider {
    constructor() {
        this.entityService = inject(AXPEntityService);
    }
    async provide(context) {
        const module = RootConfig.module;
        context.addItems([
            {
                name: AXPCustomerManagementMenuKeys.Root,
                priority: 9003,
                text: `t('root-menu', {scope:"${RootConfig.config.i18n}"})`,
                icon: module.icon,
                children: [
                    {
                        name: AXPCustomerManagementMenuKeys.Customers,
                        text: `t('customer.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.customer.name),
                        icon: RootConfig.entities.customer.icon,
                        priority: 1,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.Leads,
                        text: `t('lead.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.lead.name),
                        icon: RootConfig.entities.lead.icon,
                        priority: 2,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.Opportunities,
                        text: `t('opportunity.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.opportunity.name),
                        icon: RootConfig.entities.opportunity.icon,
                        priority: 3,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.CustomerTypes,
                        text: `t('customer-type.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.customerType.name),
                        icon: RootConfig.entities.customerType.icon,
                        priority: 6,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.CustomerSegments,
                        text: `t('customer-segment.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.customerSegment.name),
                        icon: RootConfig.entities.customerSegment.icon,
                        priority: 7,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.OpportunityStages,
                        text: `t('opportunity-stage.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.opportunityStage.name),
                        icon: RootConfig.entities.opportunityStage.icon,
                        priority: 8,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.SalesPipelines,
                        text: `t('sales-pipeline.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.salesPipeline.name),
                        icon: RootConfig.entities.salesPipeline.icon,
                        priority: 9,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.LifecycleStages,
                        text: `t('lifecycle-stage.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.lifecycleStage.name),
                        icon: RootConfig.entities.lifecycleStage.icon,
                        priority: 10,
                    },
                    {
                        name: AXPCustomerManagementMenuKeys.SalesTerritories,
                        text: `t('sales-territory.plural-title', {scope:"${RootConfig.config.i18n}"})`,
                        path: this.entityService.createPath(module.name, RootConfig.entities.salesTerritory.name),
                        icon: RootConfig.entities.salesTerritory.icon,
                        priority: 12,
                    },
                ],
            },
        ]);
    }
}

class AXMCustomerManagementCustomerEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementCustomerEntityServiceImpl extends AXMCustomerManagementCustomerEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.customer.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementCustomerEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityModule, providers: [
            {
                provide: AXMCustomerManagementCustomerEntityService,
                useClass: AXMCustomerManagementCustomerEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMCustomerManagementCustomerEntityService,
                            useClass: AXMCustomerManagementCustomerEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementCustomerTypeEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementCustomerTypeEntityServiceImpl extends AXMCustomerManagementCustomerTypeEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.customerType.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementCustomerTypeEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityModule, providers: [
            {
                provide: AXMCustomerManagementCustomerTypeEntityService,
                useClass: AXMCustomerManagementCustomerTypeEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerTypeEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementCustomerTypeEntityService,
                            useClass: AXMCustomerManagementCustomerTypeEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementCustomerSegmentEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementCustomerSegmentEntityServiceImpl extends AXMCustomerManagementCustomerSegmentEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.customerSegment.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementCustomerSegmentEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityModule, providers: [
            {
                provide: AXMCustomerManagementCustomerSegmentEntityService,
                useClass: AXMCustomerManagementCustomerSegmentEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementCustomerSegmentEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementCustomerSegmentEntityService,
                            useClass: AXMCustomerManagementCustomerSegmentEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementLeadEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementLeadEntityServiceImpl extends AXMCustomerManagementLeadEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.lead.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementLeadEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityModule, providers: [
            {
                provide: AXMCustomerManagementLeadEntityService,
                useClass: AXMCustomerManagementLeadEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLeadEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementLeadEntityService,
                            useClass: AXMCustomerManagementLeadEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementOpportunityStageEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementOpportunityStageEntityServiceImpl extends AXMCustomerManagementOpportunityStageEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.opportunityStage.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementOpportunityStageEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityModule, providers: [
            {
                provide: AXMCustomerManagementOpportunityStageEntityService,
                useClass: AXMCustomerManagementOpportunityStageEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityStageEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementOpportunityStageEntityService,
                            useClass: AXMCustomerManagementOpportunityStageEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementSalesPipelineEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementSalesPipelineEntityServiceImpl extends AXMCustomerManagementSalesPipelineEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.salesPipeline.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementSalesPipelineEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityModule, providers: [
            {
                provide: AXMCustomerManagementSalesPipelineEntityService,
                useClass: AXMCustomerManagementSalesPipelineEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesPipelineEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementSalesPipelineEntityService,
                            useClass: AXMCustomerManagementSalesPipelineEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementLifecycleStageEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementLifecycleStageEntityServiceImpl extends AXMCustomerManagementLifecycleStageEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.lifecycleStage.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementLifecycleStageEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityModule, providers: [
            {
                provide: AXMCustomerManagementLifecycleStageEntityService,
                useClass: AXMCustomerManagementLifecycleStageEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementLifecycleStageEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementLifecycleStageEntityService,
                            useClass: AXMCustomerManagementLifecycleStageEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementSalesTerritoryEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementSalesTerritoryEntityServiceImpl extends AXMCustomerManagementSalesTerritoryEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.salesTerritory.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementSalesTerritoryEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityModule, providers: [
            {
                provide: AXMCustomerManagementSalesTerritoryEntityService,
                useClass: AXMCustomerManagementSalesTerritoryEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementSalesTerritoryEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementSalesTerritoryEntityService,
                            useClass: AXMCustomerManagementSalesTerritoryEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementOpportunityEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementOpportunityEntityServiceImpl extends AXMCustomerManagementOpportunityEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.opportunity.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementOpportunityEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityModule, providers: [
            {
                provide: AXMCustomerManagementOpportunityEntityService,
                useClass: AXMCustomerManagementOpportunityEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementOpportunityEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementOpportunityEntityService,
                            useClass: AXMCustomerManagementOpportunityEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementActivityEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementActivityEntityServiceImpl extends AXMCustomerManagementActivityEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.activity.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementActivityEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityModule, providers: [
            {
                provide: AXMCustomerManagementActivityEntityService,
                useClass: AXMCustomerManagementActivityEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementActivityEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementActivityEntityService,
                            useClass: AXMCustomerManagementActivityEntityServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMCustomerManagementDealContactRoleEntityService extends AXMEntityCrudServiceImpl {
}
class AXMCustomerManagementDealContactRoleEntityServiceImpl extends AXMCustomerManagementDealContactRoleEntityService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.dealContactRole.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMCustomerManagementDealContactRoleEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityModule, providers: [
            {
                provide: AXMCustomerManagementDealContactRoleEntityService,
                useClass: AXMCustomerManagementDealContactRoleEntityServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementDealContactRoleEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    providers: [
                        {
                            provide: AXMCustomerManagementDealContactRoleEntityService,
                            useClass: AXMCustomerManagementDealContactRoleEntityServiceImpl,
                        },
                    ],
                }]
        }] });

const AXM_CUSTOMER_CODE_IDENTIFIER_RULE = {
    id: 'customer-code',
    title: 'Customer Code',
    entity: 'CustomerManagement.Customer',
    pattern: 'CUST-{date:YYYYMM}-{seq:4}',
    enabled: true,
    priority: 1,
    scopeConfig: { byTenant: false, period: 'yearly', minValue: 100, blockSize: 0 },
};

class AXMCustomerManagementModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementModule, imports: [AXMCustomerManagementCustomerEntityModule,
            AXMCustomerManagementCustomerTypeEntityModule,
            AXMCustomerManagementCustomerSegmentEntityModule,
            AXMCustomerManagementLeadEntityModule,
            AXMCustomerManagementOpportunityStageEntityModule,
            AXMCustomerManagementSalesPipelineEntityModule,
            AXMCustomerManagementLifecycleStageEntityModule,
            AXMCustomerManagementSalesTerritoryEntityModule,
            AXMCustomerManagementOpportunityEntityModule,
            AXMCustomerManagementActivityEntityModule,
            AXMCustomerManagementDealContactRoleEntityModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementModule, providers: [
            {
                provide: AXP_IDENTIFIER_RULES,
                multi: true,
                useValue: AXM_CUSTOMER_CODE_IDENTIFIER_RULE,
            },
            {
                provide: AXP_ENTITY_DEFINITION_LOADER,
                useClass: AXMCustomerManagementEntityProvider,
                multi: true,
            },
            {
                provide: AXP_MENU_PROVIDER,
                useClass: AXMMenuProvider,
                multi: true,
            },
        ], imports: [AXMCustomerManagementCustomerEntityModule,
            AXMCustomerManagementCustomerTypeEntityModule,
            AXMCustomerManagementCustomerSegmentEntityModule,
            AXMCustomerManagementLeadEntityModule,
            AXMCustomerManagementOpportunityStageEntityModule,
            AXMCustomerManagementSalesPipelineEntityModule,
            AXMCustomerManagementLifecycleStageEntityModule,
            AXMCustomerManagementSalesTerritoryEntityModule,
            AXMCustomerManagementOpportunityEntityModule,
            AXMCustomerManagementActivityEntityModule,
            AXMCustomerManagementDealContactRoleEntityModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCustomerManagementModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        AXMCustomerManagementCustomerEntityModule,
                        AXMCustomerManagementCustomerTypeEntityModule,
                        AXMCustomerManagementCustomerSegmentEntityModule,
                        AXMCustomerManagementLeadEntityModule,
                        AXMCustomerManagementOpportunityStageEntityModule,
                        AXMCustomerManagementSalesPipelineEntityModule,
                        AXMCustomerManagementLifecycleStageEntityModule,
                        AXMCustomerManagementSalesTerritoryEntityModule,
                        AXMCustomerManagementOpportunityEntityModule,
                        AXMCustomerManagementActivityEntityModule,
                        AXMCustomerManagementDealContactRoleEntityModule
                    ],
                    providers: [
                        {
                            provide: AXP_IDENTIFIER_RULES,
                            multi: true,
                            useValue: AXM_CUSTOMER_CODE_IDENTIFIER_RULE,
                        },
                        {
                            provide: AXP_ENTITY_DEFINITION_LOADER,
                            useClass: AXMCustomerManagementEntityProvider,
                            multi: true,
                        },
                        {
                            provide: AXP_MENU_PROVIDER,
                            useClass: AXMMenuProvider,
                            multi: true,
                        },
                    ],
                }]
        }] });

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

export { AXMCustomerManagementCustomerEntityService as A, RootConfig as R, AXMCustomerManagementCustomerTypeEntityService as a, AXMCustomerManagementCustomerSegmentEntityService as b, AXMCustomerManagementLeadEntityService as c, AXMCustomerManagementOpportunityStageEntityService as d, AXMCustomerManagementSalesPipelineEntityService as e, AXMCustomerManagementLifecycleStageEntityService as f, AXMCustomerManagementSalesTerritoryEntityService as g, AXMCustomerManagementOpportunityEntityService as h, AXMCustomerManagementActivityEntityService as i, AXMCustomerManagementDealContactRoleEntityService as j, AXMCustomerManagementModule as k };
//# sourceMappingURL=acorex-modules-customer-management-acorex-modules-customer-management-DJHmt24j.mjs.map
