import { Box, Button, Tab, Tabs, TextField, Typography } from "@mui/material"; import type { RefObject } from "react"; interface SignatureCaptureFieldsProps { isPending: boolean; mode: "draw" | "type"; onModeChange: (mode: "draw" | "type") => void; signerName: string; onSignerNameChange: (value: string) => void; typedName: string; onTypedNameChange: (value: string) => void; canvasRef: RefObject; startDraw: (event: React.MouseEvent | React.TouchEvent) => void; draw: (event: React.MouseEvent | React.TouchEvent) => void; stopDraw: () => void; clearCanvas: () => void; } export function SignatureCaptureFields({ isPending, mode, onModeChange, signerName, onSignerNameChange, typedName, onTypedNameChange, canvasRef, startDraw, draw, stopDraw, clearCanvas, }: SignatureCaptureFieldsProps) { return ( <> onSignerNameChange(event.target.value)} placeholder="Enter signer's full name" fullWidth size="small" disabled={isPending} /> onModeChange(value)}> {mode === "draw" ? ( ) : ( onTypedNameChange(event.target.value)} placeholder="Type your name" fullWidth size="small" disabled={isPending} /> {Boolean(typedName) && ( {typedName} )} )} ); }