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

//#endregion
//#region ----   Entity Provider   ----
class AXMOrderManagementEntityProvider {
    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.bulkBuyOrder.name:
                    return (await import('./acorex-modules-order-management-bulk-buy-order.entity-BMvkJRpA.mjs')).bulkBuyOrderFactory(this.injector);
                case RootConfig.entities.bulkBuyOrderItem.name:
                    return (await import('./acorex-modules-order-management-bulk-buy-order-item.entity-Cqsc1tku.mjs')).bulkBuyOrderItemFactory(this.injector);
                case RootConfig.entities.memberOrder.name:
                    return (await import('./acorex-modules-order-management-member-order.entity-BRAAoKae.mjs')).memberOrderFactory(this.injector);
                case RootConfig.entities.memberOrderLine.name:
                    return (await import('./acorex-modules-order-management-member-order-line.entity-C-55ZARU.mjs')).memberOrderLineFactory(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 })));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementEntityProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMOrderManagementEntityProvider, decorators: [{
            type: Injectable
        }] });

export { AXMOrderManagementEntityProvider };
//# sourceMappingURL=acorex-modules-order-management-entity.provider-D3ArjXN3.mjs.map
