import { useState } from 'react';
const types=['Left below-knee','Right below-knee','Left above-knee','Right above-knee','Left below-elbow','Right below-elbow','Left above-elbow','Right above-elbow','Knee disarticulation','Hip disarticulation','Wrist disarticulation','Shoulder disarticulation','Bilateral configuration','Custom configuration'];
export default function LimbForm({ customerUuid, onSave, onCancel }) { const [f,setF]=useState({customer_uuid:customerUuid,configuration:'Right below-knee',interface_type:'Socket',data_label:'WORKSHOP RECORD'}); const field=(k,l)=><label className="text-sm text-slate-300">{l}<input className="workshop-input" value={f[k]||''} onChange={e=>setF({...f,[k]:e.target.value})}/></label>; return <form onSubmit={e=>{e.preventDefault();onSave(f)}} className="grid gap-4 md:grid-cols-2">{field('profile_name','Profile name')}<label className="text-sm text-slate-300">Configuration<select className="workshop-input" value={f.configuration} onChange={e=>setF({...f,configuration:e.target.value})}>{types.map(x=><option key={x}>{x}</option>)}</select></label>{field('prosthesis_manufacturer','Prosthesis manufacturer')}{field('prosthesis_model','Prosthesis model')}{field('prosthetist_or_clinic','Prosthetist or clinic')}{field('important_notes','Important notes')}<div className="flex gap-2 md:col-span-2"><button className="btn-primary">Save limb profile</button><button type="button" onClick={onCancel} className="btn-secondary">Cancel</button></div></form> }