import { useCallback } from "react";
import { useSafeLingui } from "../../../i18n/index.js";
function useExecutionStatusLabel() {
    const { _ } = useSafeLingui();
    return useCallback((status)=>{
        switch(status){
            case 'InProgress':
                return _({
                    id: 'stage-node.status.in-progress',
                    message: 'In progress'
                });
            case 'Completed':
                return _({
                    id: 'stage-node.status.completed',
                    message: 'Completed'
                });
            case 'Paused':
                return _({
                    id: 'stage-node.status.paused',
                    message: 'Paused'
                });
            case 'Failed':
                return _({
                    id: 'stage-node.status.failed',
                    message: 'Failed'
                });
            case 'Cancelled':
            case 'UserCancelled':
                return _({
                    id: 'stage-node.status.cancelled',
                    message: 'Cancelled'
                });
            case 'Terminated':
                return _({
                    id: 'stage-node.status.terminated',
                    message: 'Terminated'
                });
            case 'NotExecuted':
                return _({
                    id: 'stage-node.status.not-executed',
                    message: 'Not started'
                });
            case 'Warning':
                return _({
                    id: 'stage-node.status.warning',
                    message: 'Warning'
                });
            default:
                return '';
        }
    }, [
        _
    ]);
}
export { useExecutionStatusLabel };
