import { AXPStatusProvider, systemStatusToDefinition, AXPSystemStatusType } from '@acorex/platform/common';

//#region ----   Imports   ----
//#endregion
//#region ----   Assessment Session Status Provider   ----
/**
 * Assessment session status provider defining lifecycle states: Not Started, In Progress, Submitted, Under Review, Approved, Rejected, Completed.
 * Used by the status plugin to manage assessment session status transitions and metadata.
 */
class AXMAssessmentSessionStatusProvider extends AXPStatusProvider {
    constructor() {
        super(...arguments);
        this.key = 'assessment-management.status.session';
        this.defaultStatus = 'not-started';
        this.statuses = [
            {
                name: 'not-started',
                title: '@assessment-management:sessions.states.not-started',
                color: 'secondary',
                icon: 'fa-light fa-circle',
                isInitial: true,
                generateView: true,
            },
            systemStatusToDefinition(AXPSystemStatusType.InProgress, {
                title: '@assessment-management:sessions.states.in-progress',
                generateView: true,
            }),
            {
                name: 'submitted',
                title: '@assessment-management:sessions.states.submitted',
                color: 'warning',
                icon: 'fa-light fa-paper-plane',
                generateView: true,
            },
            systemStatusToDefinition(AXPSystemStatusType.InReview, {
                title: '@assessment-management:sessions.states.under-review',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Approved, {
                title: '@assessment-management:sessions.states.approved',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Rejected, {
                title: '@assessment-management:sessions.states.rejected',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Completed, {
                title: '@assessment-management:sessions.states.completed',
                generateView: true,
            }),
        ];
        this.transitions = [
            {
                from: 'not-started',
                to: AXPSystemStatusType.InProgress,
                title: '@assessment-management:sessions.transitions.start',
            },
            {
                from: AXPSystemStatusType.InProgress,
                to: 'submitted',
                title: '@assessment-management:sessions.transitions.submit',
                requiresApproval: true,
            },
            {
                from: 'submitted',
                to: AXPSystemStatusType.InReview,
                title: '@assessment-management:sessions.transitions.review',
            },
            {
                from: AXPSystemStatusType.InReview,
                to: AXPSystemStatusType.Approved,
                title: '@assessment-management:sessions.transitions.approve',
                requiresApproval: true,
            },
            {
                from: AXPSystemStatusType.InReview,
                to: AXPSystemStatusType.Rejected,
                title: '@assessment-management:sessions.transitions.reject',
                requiresApproval: true,
            },
            {
                from: AXPSystemStatusType.Approved,
                to: AXPSystemStatusType.Completed,
                title: '@assessment-management:sessions.transitions.complete',
            },
            {
                from: 'submitted',
                to: AXPSystemStatusType.InProgress,
                title: '@assessment-management:sessions.transitions.reopen',
            },
        ];
    }
}
//#endregion

export { AXMAssessmentSessionStatusProvider };
//# sourceMappingURL=acorex-modules-assessment-management-assessment-session-status.provider-Lee6Cwg8.mjs.map
