import { AXPStatusProvider, AXPSystemStatusType, systemStatusToDefinition } from '@acorex/platform/common';
import * as i0 from '@angular/core';
import { Injectable } from '@angular/core';

//#region ----   Imports   ----
//#endregion
//#region ----   Application Status Provider   ----
/**
 * Application status provider defining lifecycle states for applications.
 * Used by the status plugin to manage application status transitions and metadata.
 */
class AXMApplicationStatusProvider extends AXPStatusProvider {
    constructor() {
        super(...arguments);
        this.key = 'application-management.status.application';
        this.defaultStatus = AXPSystemStatusType.Active;
        this.statuses = [
            systemStatusToDefinition(AXPSystemStatusType.Active, {
                title: '@application-management:applications.states.active',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Inactive, {
                title: '@application-management:applications.states.inactive',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Suspended, {
                title: '@application-management:applications.states.suspended',
                generateView: true,
            }),
            systemStatusToDefinition(AXPSystemStatusType.Pending, {
                title: '@application-management:applications.states.pending',
                generateView: true,
            }),
        ];
        this.transitions = [
            {
                from: AXPSystemStatusType.Pending,
                to: AXPSystemStatusType.Active,
                title: '@application-management:applications.transitions.activate',
            },
            {
                from: AXPSystemStatusType.Active,
                to: AXPSystemStatusType.Inactive,
                title: '@application-management:applications.transitions.deactivate',
            },
            {
                from: AXPSystemStatusType.Active,
                to: AXPSystemStatusType.Suspended,
                title: '@application-management:applications.transitions.suspend',
            },
            {
                from: AXPSystemStatusType.Suspended,
                to: AXPSystemStatusType.Active,
                title: '@application-management:applications.transitions.resume',
            },
            {
                from: AXPSystemStatusType.Inactive,
                to: AXPSystemStatusType.Active,
                title: '@application-management:applications.transitions.activate',
            },
        ];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMApplicationStatusProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMApplicationStatusProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXMApplicationStatusProvider, decorators: [{
            type: Injectable
        }] });

export { AXMApplicationStatusProvider };
//# sourceMappingURL=acorex-modules-application-management-application-status.provider-C5oClLzZ.mjs.map
