"use client"; import TooltipItem from "../common/TooltipItem"; interface Props { predictionInput: any; setPredictionInput: (v: any) => void; filters: any; handlePredict: () => void; predicting: boolean; } export default function InputForm({ predictionInput, setPredictionInput, filters, handlePredict, predicting, }: Props) { const update = (key: string, value: string) => setPredictionInput({ ...predictionInput, [key]: value }); return (

Target Finished Parameters

Prototype Input

Enter finish specifications to explore greige construction options in this prototype. Results are for evaluation feedback — not final production issuance.

update("weave", v)} options={filters?.weaves || []} required tooltip="The interlacing pattern (Plain, Twill, Satin). Determines fabric texture." /> update("blend", v)} options={filters?.blends || []} required tooltip="Yarn composition. 100%CO = 100% Cotton." /> update("dataset", v)} options={["all", "working", "piece_dyed"]} tooltip="Working = general catalog. Piece Dyed = dyed after weaving." /> update("warp_count", e.target.value)} placeholder="e.g. 40" tooltip="Yarn thickness (Ne). Raw value from swatch analysis." type="number" /> update("weft_count", e.target.value)} placeholder="e.g. 40" tooltip="Weft yarn count (Ne). Used for GSM computation." type="number" /> update("finish_epi", e.target.value)} placeholder="e.g. 120" tooltip="Ends per inch in finished fabric." type="number" /> update("finish_ppi", e.target.value)} placeholder="e.g. 90" tooltip="Picks per inch in finished fabric." type="number" /> update("target_gsm", e.target.value)} placeholder="e.g. 120" tooltip="Target fabric weight. Optional — GSM is also computed if counts + EPI/PPI provided." type="number" />
); } function InputField({ label, type = "text", value, onChange, placeholder, tooltip }: any) { return (
{label} {tooltip && }
); } function SelectField({ label, value, onChange, options, required, tooltip }: any) { return (
{label} {required && *} {tooltip && }
); }