import FaceMatchSDK from '@incodetech/welcome/faceMatch/FaceMatch';
import type { WorkflowNode } from './types';

type FaceMatchProps = {
  token: string;
  config: WorkflowNode['moduleConfiguration'];
  goNext: () => void;
};

const FaceMatch = ({ token, config, goNext }: FaceMatchProps) => {
  return (
    <FaceMatchSDK
      disableFaceMatchAnimation={config.disableFaceMatchAnimation}
      goNext={goNext}
      withProcessFace
      isSecondId={false}
      token={{ token }}
      onSuccess={goNext}
    />
  );
};

export default FaceMatch;
