import { useEffect, useState } from 'react';
import IDCapture from './IDCapture';
import processNode from './processNode';
import { WorkflowNode } from './types';
import ProcessId from './ProcessID';
import Selfie from './Selfie';
import DefaultComponent from '@incodetech/welcome/DefaultComponent';
import FaceMatch from './FaceMatch';
import Finish from './Finish';
type WorkflowProps = {
token: string;
workflowId: string;
initialNode: WorkflowNode;
};
const getModule = (
currentNode: WorkflowNode,
token: string,
onNext: () => void,
) => {
if (currentNode.nodeType === 'FINISH') {
return (
Id OCR
; } case 'ID': { returnDefault {currentNode.moduleKey}
; } } }; const Workflow = (props: WorkflowProps) => { const [currentNode, setCurrentNode] = useState