import * as i0 from '@angular/core';
import { Injectable, inject, NgModule } from '@angular/core';
import { AXPCommonMenuKeys } from '@acorex/modules/common';
import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
import { AXTranslationService } from '@acorex/core/translation';
import { AXPSearchCommandProvider, AXP_MENU_PROVIDER } from '@acorex/platform/common';
import * as i1 from '@acorex/platform/layout/widget-core';
import { AXPWidgetGroupEnum, AXP_WIDGETS_EDITOR_CATEGORY, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
import { AXP_MODULE_MANIFEST_PROVIDER } from '@acorex/platform/core';
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_LABEL_PROPERTY, AXP_READONLY_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/layout/widgets';

//#region ----   Root Configuration   ----
const config = { i18n: 'learning-management' };
const RootConfig = {
    config,
    module: {
        module: 'learning-management',
        name: 'LearningManagement',
        title: '@learning-management:module.title',
        icon: 'fa-light fa-graduation-cap',
    },
    entities: {
        skillCategory: {
            name: 'SkillCategory',
            title: '@learning-management:skills.entities.skill-category.title',
            titlePlural: '@learning-management:skills.entities.skill-category.plural',
            icon: 'fa-light fa-layer-group',
        },
        skill: {
            name: 'Skill',
            title: '@learning-management:skills.entities.skill.title',
            titlePlural: '@learning-management:skills.entities.skill.plural',
            icon: 'fa-light fa-lightbulb',
        },
        skillLevel: {
            name: 'SkillLevel',
            title: '@learning-management:skills.entities.skill-level.title',
            titlePlural: '@learning-management:skills.entities.skill-level.plural',
            icon: 'fa-light fa-stairs',
        },
        courseType: {
            name: 'CourseType',
            title: '@learning-management:courses.entities.course-type.title',
            titlePlural: '@learning-management:courses.entities.course-type.plural',
            icon: 'fa-light fa-diagram-project',
        },
        trainingDefinition: {
            name: 'TrainingDefinition',
            title: '@learning-management:trainings.entities.training-definition.title',
            titlePlural: '@learning-management:trainings.entities.training-definition.plural',
            icon: 'fa-light fa-clipboard-list-check',
        },
        course: {
            name: 'Course',
            title: '@learning-management:courses.entities.course.title',
            titlePlural: '@learning-management:courses.entities.course.plural',
            icon: 'fa-light fa-book-open',
        },
        trainingType: {
            name: 'TrainingType',
            title: '@learning-management:trainings.entities.training-type.title',
            titlePlural: '@learning-management:trainings.entities.training-type.plural',
            icon: 'fa-light fa-clipboard-list',
        },
        training: {
            name: 'Training',
            title: '@learning-management:trainings.entities.training.title',
            titlePlural: '@learning-management:trainings.entities.training.plural',
            icon: 'fa-light fa-chalkboard-teacher',
        },
        enrollment: {
            name: 'Enrollment',
            title: '@learning-management:enrollments.entities.enrollment.title',
            titlePlural: '@learning-management:enrollments.entities.enrollment.plural',
            icon: 'fa-light fa-user-plus',
        },
        attendance: {
            name: 'Attendance',
            title: '@learning-management:enrollments.entities.attendance.title',
            titlePlural: '@learning-management:enrollments.entities.attendance.plural',
            icon: 'fa-light fa-calendar-check',
        },
        certificateType: {
            name: 'CertificateType',
            title: '@learning-management:certificates.entities.certificate-type.title',
            titlePlural: '@learning-management:certificates.entities.certificate-type.plural',
            icon: 'fa-light fa-stamp',
        },
        certificateDefinition: {
            name: 'CertificateDefinition',
            title: '@learning-management:certificates.entities.certificate-definition.title',
            titlePlural: '@learning-management:certificates.entities.certificate-definition.plural',
            icon: 'fa-light fa-scroll',
        },
        certificate: {
            name: 'Certificate',
            title: '@learning-management:certificates.entities.certificate.title',
            titlePlural: '@learning-management:certificates.entities.certificate.plural',
            icon: 'fa-light fa-award',
        },
        learningPath: {
            name: 'LearningPath',
            title: '@learning-management:learning-paths.entities.learning-path.title',
            titlePlural: '@learning-management:learning-paths.entities.learning-path.plural',
            icon: 'fa-light fa-route',
        },
        learningPathCourse: {
            name: 'LearningPathCourse',
            title: '@learning-management:learning-paths.entities.learning-path-course.title',
            titlePlural: '@learning-management:learning-paths.entities.learning-path-course.plural',
            icon: 'fa-light fa-list-ol',
        },
        mandatoryTrainingRule: {
            name: 'MandatoryTrainingRule',
            title: '@learning-management:compliance.entities.mandatory-training-rule.title',
            titlePlural: '@learning-management:compliance.entities.mandatory-training-rule.plural',
            icon: 'fa-light fa-clipboard-check',
        },
    },
};
//#endregion

//#region ----   Imports   ----
//#endregion
//#region ----   Entity Provider   ----
class AXMLearningManagementEntityProvider {
    constructor(injector) {
        this.injector = injector;
    }
    async get(moduleName, entityName) {
        if (moduleName === RootConfig.module.name) {
            switch (entityName) {
                case RootConfig.entities.skill.name:
                    return (await import('./acorex-modules-learning-management-skill.entity-rfMFaOAJ.mjs')).factory(this.injector);
                case RootConfig.entities.skillLevel.name:
                    return (await import('./acorex-modules-learning-management-skill-level.entity-DXOWslpB.mjs')).factory(this.injector);
                case RootConfig.entities.courseType.name:
                    return (await import('./acorex-modules-learning-management-course-type.entity-B1c6PDLq.mjs')).factory(this.injector);
                case RootConfig.entities.course.name:
                    return (await import('./acorex-modules-learning-management-course.entity-BN8XHAPz.mjs')).factory(this.injector);
                case RootConfig.entities.trainingType.name:
                    return (await import('./acorex-modules-learning-management-training-type.entity-CoyDCeen.mjs')).factory(this.injector);
                case RootConfig.entities.trainingDefinition.name:
                    return (await import('./acorex-modules-learning-management-training-definition.entity-NQqJ5avw.mjs')).factory(this.injector);
                case RootConfig.entities.training.name:
                    return (await import('./acorex-modules-learning-management-training.entity-DHGSlVR3.mjs')).factory(this.injector);
                case RootConfig.entities.enrollment.name:
                    return (await import('./acorex-modules-learning-management-enrollment.entity-i-3o7Lp3.mjs')).factory(this.injector);
                case RootConfig.entities.attendance.name:
                    return (await import('./acorex-modules-learning-management-attendance.entity-BXm8I4nQ.mjs')).factory(this.injector);
                case RootConfig.entities.certificateType.name:
                    return (await import('./acorex-modules-learning-management-certificate-type.entity-CBM6N-PD.mjs')).factory(this.injector);
                case RootConfig.entities.certificateDefinition.name:
                    return (await import('./acorex-modules-learning-management-certificate-definition.entity-27VKYxw1.mjs')).factory(this.injector);
                case RootConfig.entities.certificate.name:
                    return (await import('./acorex-modules-learning-management-certificate.entity-BavQuFHb.mjs')).factory(this.injector);
                case RootConfig.entities.learningPath.name:
                    return (await import('./acorex-modules-learning-management-learning-path.entity-8QlM3R4B.mjs')).factory(this.injector);
                case RootConfig.entities.learningPathCourse.name:
                    return (await import('./acorex-modules-learning-management-learning-path-course.entity-DSIGI87P.mjs')).factory(this.injector);
                case RootConfig.entities.mandatoryTrainingRule.name:
                    return (await import('./acorex-modules-learning-management-mandatory-training-rule.entity-CtFeVKkC.mjs')).factory(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: AXMLearningManagementEntityProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementEntityProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementEntityProvider, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: i0.Injector }] });

const AXMLearningManagementMenuKeys = {
    Root: 'learning-management:menu',
    ConfigurationRoot: 'learning-management:menu:configuration',
    Skills: 'learning-management:menu:skills',
    Courses: 'learning-management:menu:courses',
    Trainings: 'learning-management:menu:trainings',
    Enrollments: 'learning-management:menu:enrollments',
    Certificates: 'learning-management:menu:certificates',
    LearningPaths: 'learning-management:menu:learning-paths',
    Compliance: 'learning-management:menu:compliance',
};

//#region ----   Imports   ----
//#endregion
//#region ----   Menu Provider   ----
/**
 * Learning Management Module Menu Provider.
 * - Root "Learning": Skills, Courses, Trainings, Enrollments, Certificates, Learning Paths (operational)
 * - Configuration/Learning: Skill Levels, Course Types, Training Definitions/Types, Certificate Definitions/Types, Mandatory Training Rules (reference)
 */
class AXMLearningManagementMenuProvider {
    constructor() {
        this.entityService = inject(AXPEntityService);
    }
    async provide(context) {
        const module = RootConfig.module;
        // Root "Learning" - single level, direct links with dividers
        context.addItems([
            {
                name: AXMLearningManagementMenuKeys.Root,
                priority: 9020,
                text: '@learning-management:module.menus.root.title',
                icon: module.icon,
                policy: {
                    features: [module.name],
                },
                children: [
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:skills`,
                        text: RootConfig.entities.skill.titlePlural,
                        icon: RootConfig.entities.skill.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.skill.name),
                        priority: 1,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:courses`,
                        text: RootConfig.entities.course.titlePlural,
                        icon: RootConfig.entities.course.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.course.name),
                        priority: 2,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:trainings`,
                        text: RootConfig.entities.training.titlePlural,
                        icon: RootConfig.entities.training.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.training.name),
                        priority: 3,
                    },
                    { name: `${AXMLearningManagementMenuKeys.Root}:divider1`, text: '', type: 'break', priority: 4 },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:enrollments`,
                        text: RootConfig.entities.enrollment.titlePlural,
                        icon: RootConfig.entities.enrollment.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.enrollment.name),
                        priority: 5,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:attendance`,
                        text: RootConfig.entities.attendance.titlePlural,
                        icon: RootConfig.entities.attendance.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.attendance.name),
                        priority: 6,
                    },
                    { name: `${AXMLearningManagementMenuKeys.Root}:divider2`, text: '', type: 'break', priority: 7 },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:certificates`,
                        text: RootConfig.entities.certificate.titlePlural,
                        icon: RootConfig.entities.certificate.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.certificate.name),
                        priority: 8,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.Root}:learning-paths`,
                        text: RootConfig.entities.learningPath.titlePlural,
                        icon: RootConfig.entities.learningPath.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.learningPath.name),
                        priority: 9,
                    },
                ],
            },
        ]);
        // Configuration/Learning - reference data
        context.find(AXPCommonMenuKeys.Configuration).addItems([
            {
                name: AXMLearningManagementMenuKeys.ConfigurationRoot,
                priority: 8650,
                text: '@learning-management:module.menus.configuration.title',
                icon: module.icon,
                policy: {
                    features: [module.name],
                },
                children: [
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:skill-levels`,
                        text: RootConfig.entities.skillLevel.titlePlural,
                        icon: RootConfig.entities.skillLevel.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.skillLevel.name),
                        priority: 1,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:course-types`,
                        text: RootConfig.entities.courseType.titlePlural,
                        icon: RootConfig.entities.courseType.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.courseType.name),
                        priority: 2,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:training-definitions`,
                        text: RootConfig.entities.trainingDefinition.titlePlural,
                        icon: RootConfig.entities.trainingDefinition.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.trainingDefinition.name),
                        priority: 3,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:training-types`,
                        text: RootConfig.entities.trainingType.titlePlural,
                        icon: RootConfig.entities.trainingType.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.trainingType.name),
                        priority: 4,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:certificate-definitions`,
                        text: RootConfig.entities.certificateDefinition.titlePlural,
                        icon: RootConfig.entities.certificateDefinition.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.certificateDefinition.name),
                        priority: 5,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:certificate-types`,
                        text: RootConfig.entities.certificateType.titlePlural,
                        icon: RootConfig.entities.certificateType.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.certificateType.name),
                        priority: 6,
                    },
                    {
                        name: `${AXMLearningManagementMenuKeys.ConfigurationRoot}:mandatory-rules`,
                        text: RootConfig.entities.mandatoryTrainingRule.titlePlural,
                        icon: RootConfig.entities.mandatoryTrainingRule.icon,
                        path: this.entityService.createPath(module.name, RootConfig.entities.mandatoryTrainingRule.name),
                        priority: 7,
                    },
                ],
            },
        ]);
    }
}
//#endregion

const AXMLearningManagementPermissionKeys = {
    LearningManagement: {
        Management: 'LearningManagement:Permission:Management',
        SkillCategory: {
            Management: 'LearningManagement:Permission:SkillCategory.Management',
            View: 'LearningManagement:Permission:SkillCategory.View',
            Create: 'LearningManagement:Permission:SkillCategory.Create',
            Update: 'LearningManagement:Permission:SkillCategory.Update',
            Delete: 'LearningManagement:Permission:SkillCategory.Delete',
        },
        Skill: {
            Management: 'LearningManagement:Permission:Skill.Management',
            View: 'LearningManagement:Permission:Skill.View',
            Create: 'LearningManagement:Permission:Skill.Create',
            Update: 'LearningManagement:Permission:Skill.Update',
            Delete: 'LearningManagement:Permission:Skill.Delete',
        },
        SkillLevel: {
            Management: 'LearningManagement:Permission:SkillLevel.Management',
            View: 'LearningManagement:Permission:SkillLevel.View',
            Create: 'LearningManagement:Permission:SkillLevel.Create',
            Update: 'LearningManagement:Permission:SkillLevel.Update',
            Delete: 'LearningManagement:Permission:SkillLevel.Delete',
        },
        CourseType: {
            Management: 'LearningManagement:Permission:CourseType.Management',
            View: 'LearningManagement:Permission:CourseType.View',
            Create: 'LearningManagement:Permission:CourseType.Create',
            Update: 'LearningManagement:Permission:CourseType.Update',
            Delete: 'LearningManagement:Permission:CourseType.Delete',
        },
        Course: {
            Management: 'LearningManagement:Permission:Course.Management',
            View: 'LearningManagement:Permission:Course.View',
            Create: 'LearningManagement:Permission:Course.Create',
            Update: 'LearningManagement:Permission:Course.Update',
            Delete: 'LearningManagement:Permission:Course.Delete',
            Publish: 'LearningManagement:Permission:Course.Publish',
        },
        TrainingType: {
            Management: 'LearningManagement:Permission:TrainingType.Management',
            View: 'LearningManagement:Permission:TrainingType.View',
            Create: 'LearningManagement:Permission:TrainingType.Create',
            Update: 'LearningManagement:Permission:TrainingType.Update',
            Delete: 'LearningManagement:Permission:TrainingType.Delete',
        },
        TrainingDefinition: {
            Management: 'LearningManagement:Permission:TrainingDefinition.Management',
            View: 'LearningManagement:Permission:TrainingDefinition.View',
            Create: 'LearningManagement:Permission:TrainingDefinition.Create',
            Update: 'LearningManagement:Permission:TrainingDefinition.Update',
            Delete: 'LearningManagement:Permission:TrainingDefinition.Delete',
            Publish: 'LearningManagement:Permission:TrainingDefinition.Publish',
        },
        Training: {
            Management: 'LearningManagement:Permission:Training.Management',
            View: 'LearningManagement:Permission:Training.View',
            Create: 'LearningManagement:Permission:Training.Create',
            Update: 'LearningManagement:Permission:Training.Update',
            Delete: 'LearningManagement:Permission:Training.Delete',
            Schedule: 'LearningManagement:Permission:Training.Schedule',
            Close: 'LearningManagement:Permission:Training.Close',
        },
        Enrollment: {
            Management: 'LearningManagement:Permission:Enrollment.Management',
            View: 'LearningManagement:Permission:Enrollment.View',
            Create: 'LearningManagement:Permission:Enrollment.Create',
            Update: 'LearningManagement:Permission:Enrollment.Update',
            Delete: 'LearningManagement:Permission:Enrollment.Delete',
            Process: 'LearningManagement:Permission:Enrollment.Process',
        },
        Attendance: {
            Management: 'LearningManagement:Permission:Attendance.Management',
            View: 'LearningManagement:Permission:Attendance.View',
            Create: 'LearningManagement:Permission:Attendance.Create',
            Update: 'LearningManagement:Permission:Attendance.Update',
            Delete: 'LearningManagement:Permission:Attendance.Delete',
            Record: 'LearningManagement:Permission:Attendance.Record',
        },
        CertificateType: {
            Management: 'LearningManagement:Permission:CertificateType.Management',
            View: 'LearningManagement:Permission:CertificateType.View',
            Create: 'LearningManagement:Permission:CertificateType.Create',
            Update: 'LearningManagement:Permission:CertificateType.Update',
            Delete: 'LearningManagement:Permission:CertificateType.Delete',
        },
        CertificateDefinition: {
            Management: 'LearningManagement:Permission:CertificateDefinition.Management',
            View: 'LearningManagement:Permission:CertificateDefinition.View',
            Create: 'LearningManagement:Permission:CertificateDefinition.Create',
            Update: 'LearningManagement:Permission:CertificateDefinition.Update',
            Delete: 'LearningManagement:Permission:CertificateDefinition.Delete',
            Publish: 'LearningManagement:Permission:CertificateDefinition.Publish',
        },
        Certificate: {
            Management: 'LearningManagement:Permission:Certificate.Management',
            View: 'LearningManagement:Permission:Certificate.View',
            Create: 'LearningManagement:Permission:Certificate.Create',
            Update: 'LearningManagement:Permission:Certificate.Update',
            Delete: 'LearningManagement:Permission:Certificate.Delete',
            Issue: 'LearningManagement:Permission:Certificate.Issue',
            Renew: 'LearningManagement:Permission:Certificate.Renew',
        },
        LearningPath: {
            Management: 'LearningManagement:Permission:LearningPath.Management',
            View: 'LearningManagement:Permission:LearningPath.View',
            Create: 'LearningManagement:Permission:LearningPath.Create',
            Update: 'LearningManagement:Permission:LearningPath.Update',
            Delete: 'LearningManagement:Permission:LearningPath.Delete',
            Publish: 'LearningManagement:Permission:LearningPath.Publish',
            Assign: 'LearningManagement:Permission:LearningPath.Assign',
        },
        MandatoryTrainingRule: {
            Management: 'LearningManagement:Permission:MandatoryTrainingRule.Management',
            View: 'LearningManagement:Permission:MandatoryTrainingRule.View',
            Create: 'LearningManagement:Permission:MandatoryTrainingRule.Create',
            Update: 'LearningManagement:Permission:MandatoryTrainingRule.Update',
            Delete: 'LearningManagement:Permission:MandatoryTrainingRule.Delete',
            Activate: 'LearningManagement:Permission:MandatoryTrainingRule.Activate',
        },
    },
};

//#region ----   Imports   ----
//#endregion
//#region ----   Permission Definition Provider   ----
class AXMLearningManagementPermissionDefinitionProvider {
    constructor(injector) {
        this.injector = injector;
        this.translationService = this.injector.get(AXTranslationService);
    }
    async define(context) {
        const keys = AXMLearningManagementPermissionKeys.LearningManagement;
        const moduleTitle = await this.translationService.translateAsync('@learning-management:module.title');
        const skillCategoryTrans = async (action) => await this.translationService.translateAsync(`@learning-management:skills.permissions.skill-category.actions.${action}.title`);
        const skillTrans = async (action) => await this.translationService.translateAsync(`@learning-management:skills.permissions.skill.actions.${action}.title`);
        const skillLevelTrans = async (action) => await this.translationService.translateAsync(`@learning-management:skills.permissions.skill-level.actions.${action}.title`);
        const courseTypeTrans = async (action) => await this.translationService.translateAsync(`@learning-management:courses.permissions.course-type.actions.${action}.title`);
        const courseTrans = async (action) => await this.translationService.translateAsync(`@learning-management:courses.permissions.course.actions.${action}.title`);
        const trainingTypeTrans = async (action) => await this.translationService.translateAsync(`@learning-management:trainings.permissions.training-type.actions.${action}.title`);
        const trainingDefinitionTrans = async (action) => await this.translationService.translateAsync(`@learning-management:trainings.permissions.training-definition.actions.${action}.title`);
        const trainingTrans = async (action) => await this.translationService.translateAsync(`@learning-management:trainings.permissions.training.actions.${action}.title`);
        const enrollmentTrans = async (action) => await this.translationService.translateAsync(`@learning-management:enrollments.permissions.enrollment.actions.${action}.title`);
        const attendanceTrans = async (action) => await this.translationService.translateAsync(`@learning-management:enrollments.permissions.attendance.actions.${action}.title`);
        const certificateTypeTrans = async (action) => await this.translationService.translateAsync(`@learning-management:certificates.permissions.certificate-type.actions.${action}.title`);
        const certificateDefinitionTrans = async (action) => await this.translationService.translateAsync(`@learning-management:certificates.permissions.certificate-definition.actions.${action}.title`);
        const certificateTrans = async (action) => await this.translationService.translateAsync(`@learning-management:certificates.permissions.certificate.actions.${action}.title`);
        const learningPathTrans = async (action) => await this.translationService.translateAsync(`@learning-management:learning-paths.permissions.learning-path.actions.${action}.title`);
        const mandatoryRuleTrans = async (action) => await this.translationService.translateAsync(`@learning-management:compliance.permissions.mandatory-training-rule.actions.${action}.title`);
        context
            .addGroup(RootConfig.module.name, moduleTitle)
            .addPermission(keys.SkillCategory.Management, await skillCategoryTrans('manage'))
            .addChild(keys.SkillCategory.View, await skillCategoryTrans('view'))
            .addChild(keys.SkillCategory.Create, await skillCategoryTrans('create'))
            .addChild(keys.SkillCategory.Update, await skillCategoryTrans('update'))
            .addChild(keys.SkillCategory.Delete, await skillCategoryTrans('delete'))
            .endPermission()
            .addPermission(keys.Skill.Management, await skillTrans('manage'))
            .addChild(keys.Skill.View, await skillTrans('view'))
            .addChild(keys.Skill.Create, await skillTrans('create'))
            .addChild(keys.Skill.Update, await skillTrans('update'))
            .addChild(keys.Skill.Delete, await skillTrans('delete'))
            .endPermission()
            .addPermission(keys.SkillLevel.Management, await skillLevelTrans('manage'))
            .addChild(keys.SkillLevel.View, await skillLevelTrans('view'))
            .addChild(keys.SkillLevel.Create, await skillLevelTrans('create'))
            .addChild(keys.SkillLevel.Update, await skillLevelTrans('update'))
            .addChild(keys.SkillLevel.Delete, await skillLevelTrans('delete'))
            .endPermission()
            .addPermission(keys.CourseType.Management, await courseTypeTrans('manage'))
            .addChild(keys.CourseType.View, await courseTypeTrans('view'))
            .addChild(keys.CourseType.Create, await courseTypeTrans('create'))
            .addChild(keys.CourseType.Update, await courseTypeTrans('update'))
            .addChild(keys.CourseType.Delete, await courseTypeTrans('delete'))
            .endPermission()
            .addPermission(keys.Course.Management, await courseTrans('manage'))
            .addChild(keys.Course.View, await courseTrans('view'))
            .addChild(keys.Course.Create, await courseTrans('create'))
            .addChild(keys.Course.Update, await courseTrans('update'))
            .addChild(keys.Course.Delete, await courseTrans('delete'))
            .addChild(keys.Course.Publish, await courseTrans('publish'))
            .endPermission()
            .addPermission(keys.TrainingType.Management, await trainingTypeTrans('manage'))
            .addChild(keys.TrainingType.View, await trainingTypeTrans('view'))
            .addChild(keys.TrainingType.Create, await trainingTypeTrans('create'))
            .addChild(keys.TrainingType.Update, await trainingTypeTrans('update'))
            .addChild(keys.TrainingType.Delete, await trainingTypeTrans('delete'))
            .endPermission()
            .addPermission(keys.TrainingDefinition.Management, await trainingDefinitionTrans('manage'))
            .addChild(keys.TrainingDefinition.View, await trainingDefinitionTrans('view'))
            .addChild(keys.TrainingDefinition.Create, await trainingDefinitionTrans('create'))
            .addChild(keys.TrainingDefinition.Update, await trainingDefinitionTrans('update'))
            .addChild(keys.TrainingDefinition.Delete, await trainingDefinitionTrans('delete'))
            .addChild(keys.TrainingDefinition.Publish, await trainingDefinitionTrans('publish'))
            .endPermission()
            .addPermission(keys.Training.Management, await trainingTrans('manage'))
            .addChild(keys.Training.View, await trainingTrans('view'))
            .addChild(keys.Training.Create, await trainingTrans('create'))
            .addChild(keys.Training.Update, await trainingTrans('update'))
            .addChild(keys.Training.Delete, await trainingTrans('delete'))
            .addChild(keys.Training.Schedule, await trainingTrans('schedule'))
            .addChild(keys.Training.Close, await trainingTrans('close'))
            .endPermission()
            .addPermission(keys.Enrollment.Management, await enrollmentTrans('manage'))
            .addChild(keys.Enrollment.View, await enrollmentTrans('view'))
            .addChild(keys.Enrollment.Create, await enrollmentTrans('create'))
            .addChild(keys.Enrollment.Update, await enrollmentTrans('update'))
            .addChild(keys.Enrollment.Delete, await enrollmentTrans('delete'))
            .addChild(keys.Enrollment.Process, await enrollmentTrans('process'))
            .endPermission()
            .addPermission(keys.Attendance.Management, await attendanceTrans('manage'))
            .addChild(keys.Attendance.View, await attendanceTrans('view'))
            .addChild(keys.Attendance.Create, await attendanceTrans('create'))
            .addChild(keys.Attendance.Update, await attendanceTrans('update'))
            .addChild(keys.Attendance.Delete, await attendanceTrans('delete'))
            .addChild(keys.Attendance.Record, await attendanceTrans('record'))
            .endPermission()
            .addPermission(keys.CertificateType.Management, await certificateTypeTrans('manage'))
            .addChild(keys.CertificateType.View, await certificateTypeTrans('view'))
            .addChild(keys.CertificateType.Create, await certificateTypeTrans('create'))
            .addChild(keys.CertificateType.Update, await certificateTypeTrans('update'))
            .addChild(keys.CertificateType.Delete, await certificateTypeTrans('delete'))
            .endPermission()
            .addPermission(keys.CertificateDefinition.Management, await certificateDefinitionTrans('manage'))
            .addChild(keys.CertificateDefinition.View, await certificateDefinitionTrans('view'))
            .addChild(keys.CertificateDefinition.Create, await certificateDefinitionTrans('create'))
            .addChild(keys.CertificateDefinition.Update, await certificateDefinitionTrans('update'))
            .addChild(keys.CertificateDefinition.Delete, await certificateDefinitionTrans('delete'))
            .addChild(keys.CertificateDefinition.Publish, await certificateDefinitionTrans('publish'))
            .endPermission()
            .addPermission(keys.Certificate.Management, await certificateTrans('manage'))
            .addChild(keys.Certificate.View, await certificateTrans('view'))
            .addChild(keys.Certificate.Create, await certificateTrans('create'))
            .addChild(keys.Certificate.Update, await certificateTrans('update'))
            .addChild(keys.Certificate.Delete, await certificateTrans('delete'))
            .addChild(keys.Certificate.Issue, await certificateTrans('issue'))
            .addChild(keys.Certificate.Renew, await certificateTrans('renew'))
            .endPermission()
            .addPermission(keys.LearningPath.Management, await learningPathTrans('manage'))
            .addChild(keys.LearningPath.View, await learningPathTrans('view'))
            .addChild(keys.LearningPath.Create, await learningPathTrans('create'))
            .addChild(keys.LearningPath.Update, await learningPathTrans('update'))
            .addChild(keys.LearningPath.Delete, await learningPathTrans('delete'))
            .addChild(keys.LearningPath.Publish, await learningPathTrans('publish'))
            .addChild(keys.LearningPath.Assign, await learningPathTrans('assign'))
            .endPermission()
            .addPermission(keys.MandatoryTrainingRule.Management, await mandatoryRuleTrans('manage'))
            .addChild(keys.MandatoryTrainingRule.View, await mandatoryRuleTrans('view'))
            .addChild(keys.MandatoryTrainingRule.Create, await mandatoryRuleTrans('create'))
            .addChild(keys.MandatoryTrainingRule.Update, await mandatoryRuleTrans('update'))
            .addChild(keys.MandatoryTrainingRule.Delete, await mandatoryRuleTrans('delete'))
            .addChild(keys.MandatoryTrainingRule.Activate, await mandatoryRuleTrans('activate'))
            .endPermission()
            .endGroup();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementPermissionDefinitionProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementPermissionDefinitionProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementPermissionDefinitionProvider, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: i0.Injector }] });

//#region ----   Imports   ----
//#endregion
//#region ----   Search Provider   ----
class AXMLearningManagementSearchCommandProvider extends AXPSearchCommandProvider {
    constructor() {
        super(...arguments);
        this.commands = [
            {
                group: 'entity',
                title: '@learning-management:skills.search.create-skill.title',
                icon: RootConfig.entities.skill.icon,
                description: '@learning-management:skills.search.create-skill.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.skill.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:courses.search.create-course.title',
                icon: RootConfig.entities.course.icon,
                description: '@learning-management:courses.search.create-course.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.course.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:trainings.search.schedule-training.title',
                icon: RootConfig.entities.training.icon,
                description: '@learning-management:trainings.search.schedule-training.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.training.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:trainings.search.create-training-definition.title',
                icon: RootConfig.entities.trainingDefinition.icon,
                description: '@learning-management:trainings.search.create-training-definition.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.trainingDefinition.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:enrollments.search.create-enrollment.title',
                icon: RootConfig.entities.enrollment.icon,
                description: '@learning-management:enrollments.search.create-enrollment.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.enrollment.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:learning-paths.search.create-learning-path.title',
                icon: RootConfig.entities.learningPath.icon,
                description: '@learning-management:learning-paths.search.create-learning-path.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.learningPath.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:certificates.search.issue-certificate.title',
                icon: RootConfig.entities.certificate.icon,
                description: '@learning-management:certificates.search.issue-certificate.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.certificate.name}`,
                    },
                },
            },
            {
                group: 'entity',
                title: '@learning-management:certificates.search.create-certificate-definition.title',
                icon: RootConfig.entities.certificateDefinition.icon,
                description: '@learning-management:certificates.search.create-certificate-definition.description',
                command: {
                    name: 'create-entity',
                    options: {
                        entity: `${RootConfig.module.name}.${RootConfig.entities.certificateDefinition.name}`,
                    },
                },
            },
        ];
    }
}
//#endregion

//#region ----   Imports   ----
//#endregion
//#region ----   Manifest Definition   ----
/**
 * Learning Management Module Manifest.
 * Defines module metadata, features, and provider references.
 */
const LearningManagementManifest = {
    name: RootConfig.module.name,
    version: '1.0.0',
    title: RootConfig.module.title,
    icon: RootConfig.module.icon,
    i18n: RootConfig.config.i18n,
    // Module dependencies (optional)
};
//#endregion

const AXLSkillMatrixWidget = {
    name: 'skill-matrix-editor',
    title: 'Skill Matrix',
    categories: AXP_WIDGETS_EDITOR_CATEGORY,
    groups: [AXPWidgetGroupEnum.UtilityWidget],
    description: 'Matrix widget for managing skill levels across different skills',
    icon: 'fa-light fa-table',
    type: 'editor',
    options: {
        needLabel: false,
    },
    properties: [
        AXP_NAME_PROPERTY,
        AXP_DATA_PATH_PROPERTY,
        AXP_LABEL_PROPERTY,
        AXP_READONLY_PROPERTY,
        AXP_DISABLED_PROPERTY,
    ],
    components: {
        view: {
            component: () => import('./acorex-modules-learning-management-skill-matrix-widget-view.component-C5O2l2HW.mjs').then((c) => c.AXLSkillMatrixWidgetViewComponent),
        },
        edit: {
            component: () => import('./acorex-modules-learning-management-skill-matrix-widget-edit.component-DnDbFIMf.mjs').then((c) => c.AXLSkillMatrixWidgetEditComponent),
        },
    },
};

//#region ----   Imports   ----
//#endregion
//#region ----   Module   ----
class AXMLearningManagementModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementModule, imports: [i1.AXPWidgetCoreModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementModule, providers: [
            // Module Manifest Provider
            {
                provide: AXP_MODULE_MANIFEST_PROVIDER,
                useValue: LearningManagementManifest,
                multi: true,
            },
            // Provider references (now using tokens)
            {
                provide: AXP_PERMISSION_DEFINITION_PROVIDER,
                useClass: AXMLearningManagementPermissionDefinitionProvider,
                multi: true,
            },
            {
                provide: AXP_MENU_PROVIDER,
                useClass: AXMLearningManagementMenuProvider,
                multi: true,
            },
            {
                provide: AXP_ENTITY_DEFINITION_LOADER,
                useClass: AXMLearningManagementEntityProvider,
                multi: true,
            },
        ], imports: [AXPWidgetCoreModule.forChild({
                widgets: [AXLSkillMatrixWidget],
            })] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMLearningManagementModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        AXPWidgetCoreModule.forChild({
                            widgets: [AXLSkillMatrixWidget],
                        }),
                    ],
                    providers: [
                        // Module Manifest Provider
                        {
                            provide: AXP_MODULE_MANIFEST_PROVIDER,
                            useValue: LearningManagementManifest,
                            multi: true,
                        },
                        // Provider references (now using tokens)
                        {
                            provide: AXP_PERMISSION_DEFINITION_PROVIDER,
                            useClass: AXMLearningManagementPermissionDefinitionProvider,
                            multi: true,
                        },
                        {
                            provide: AXP_MENU_PROVIDER,
                            useClass: AXMLearningManagementMenuProvider,
                            multi: true,
                        },
                        {
                            provide: AXP_ENTITY_DEFINITION_LOADER,
                            useClass: AXMLearningManagementEntityProvider,
                            multi: true,
                        },
                    ],
                }]
        }] });

//#region ----   Skill Model   ----
//#endregion

//#region ----   Skill Level Model   ----
//#endregion

//#region ----   Course Type Model   ----
//#endregion

//#region ----   Course Model   ----
//#endregion

//#region ----   Training Type Model   ----
//#endregion

//#region ----   Training Definition Model   ----
//#endregion

//#region ----   Training Model   ----
//#endregion

//#region ----   Enrollment Model   ----
//#endregion

//#region ----   Attendance Model   ----
//#endregion

//#region ----   Certificate Type Model   ----
//#endregion

//#region ----   Certificate Definition Model   ----
//#endregion

//#region ----   Certificate Model   ----
//#endregion

//#region ----   Learning Path Model   ----
//#endregion

//#region ----   Learning Path Course Model   ----
//#endregion

//#region ----   Mandatory Training Rule Model   ----
//#endregion

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

export { AXMLearningManagementEntityProvider, AXMLearningManagementMenuKeys, AXMLearningManagementMenuProvider, AXMLearningManagementModule, AXMLearningManagementPermissionDefinitionProvider, AXMLearningManagementPermissionKeys, AXMLearningManagementSearchCommandProvider, RootConfig };
//# sourceMappingURL=acorex-modules-learning-management.mjs.map
