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

//#region ----   Imports   ----
//#endregion
//#region ----   Member Order Status Provider   ----
/**
 * Member Order status provider defining lifecycle states: Pending, Confirmed, Paid, Cancelled.
 * Used by the status plugin to manage member order status transitions and metadata.
 */
class AXMMemberOrderStatusProvider extends AXPStatusProvider {
    constructor() {
        super(...arguments);
        this.key = 'order-management.status.member-order';
        this.defaultStatus = AXPSystemStatusType.Pending;
        this.statuses = [
            systemStatusToDefinition(AXPSystemStatusType.Pending, {
                title: '@order-management:bulk-buy-orders.states.pending',
                generateView: true,
            }),
            {
                name: 'confirmed',
                title: '@order-management:bulk-buy-orders.states.confirmed',
                color: 'info',
                icon: 'fa-light fa-check',
                order: 2,
                generateView: true,
            },
            {
                name: 'paid',
                title: '@order-management:bulk-buy-orders.states.paid',
                color: 'success',
                icon: 'fa-light fa-check-circle',
                order: 3,
                isFinal: true,
                generateView: true,
            },
            systemStatusToDefinition(AXPSystemStatusType.Cancelled, {
                title: '@order-management:bulk-buy-orders.states.cancelled',
                generateView: true,
            }),
        ];
        this.transitions = [
            {
                from: AXPSystemStatusType.Pending,
                to: 'confirmed',
                title: '@order-management:bulk-buy-orders.transitions.confirm',
            },
            {
                from: 'confirmed',
                to: 'paid',
                title: '@order-management:bulk-buy-orders.transitions.mark-paid',
            },
            {
                from: AXPSystemStatusType.Pending,
                to: AXPSystemStatusType.Cancelled,
                title: '@order-management:bulk-buy-orders.transitions.cancel',
            },
            {
                from: 'confirmed',
                to: AXPSystemStatusType.Cancelled,
                title: '@order-management:bulk-buy-orders.transitions.cancel',
            },
        ];
    }
}
//#endregion

export { AXMMemberOrderStatusProvider };
//# sourceMappingURL=acorex-modules-order-management-member-order-status.provider-Bkrzylqm.mjs.map
