const patterJourneyMachine = Machine({
    id: 'pattern',
    initial: 'Pattern exists in the UI library?',
    states: {
        "Pattern exists in the UI library?": {
            on: {
                YES: 'Does it fulfill all the requirements?',
                NO: 'Similar pattern exists in other projects?'
            }
        },
        "Does it fulfill all the requirements?": {
            on: {
                YES: 'Just use it!',
                NO: 'Can be modified to fulfill all requirements?'
            }
        },
        "Can be modified to fulfill all requirements?": {
            on: {
                YES: "Implement in the UI library",
                NO: "Other teams ready to use altered version?"
            }
        },
        "Similar pattern exists in other projects?": {
            on: {
                YES: "Can the existed pattern be used?",
                NO: "Can be used by other projects in the future?"
            }
        },
        "Other teams ready to use altered version?": {
            on: {
                YES: "Implement in the UI library",
                NO: "Implement in the project"
            }
        },
        "Can be used by other projects in the future?": {
            on: {
                YES: "Implement in the UI library",
                NO: "Implement in the project"
            }
        },
        "Can the existed pattern be used?": {
            on: {
                YES: "Implement in the UI library",
                NO: "Other teams ready to use altered version?"
            }
        },
        "Implement in the UI library": {
            type: 'final'
        },
        "Implement in the project": {
            type: 'final'
        },
        "Just use it!": {
            type: 'final'
        },
    }
});