// Available variables: // - Machine // - interpret // - assign // - send // - sendParent // - spawn // - raise // - actions // - XState (all XState exports) const fetchMachine = Machine({ id: 'GDPR Request', initial: 'Draft', context: { retries: 0 }, states: { Draft: { on: { 'ASSIGN TO DPO': 'New' } }, New: { on: { START: 'In Progress', 'WITHDRAW': 'Withdrawn' } }, 'In Progress': { on: { 'STOP THE CLOCK': 'On Hold', 'CLOSE': 'Closed', 'WITHDRAW': 'Withdrawn' } }, 'On Hold': { on: { 'RESTART THE CLOCK': 'In Progress', 'WITHDRAW': 'Withdrawn' } }, 'Closed': { type: 'final' }, 'Withdrawn': { type: 'final' }, } });