{/* Header */}
{ifElse(
computed(() => phase === "preview"),
"Review Changes",
"Extract from Text",
)}
{/* Idle/Ready state - text input with Extract button */}
{ifElse(
computed(() =>
phase === "idle" || phase === "ready" || phase === "error"
),
{/* SmartTextInput: supports text, file upload, and image OCR */}
{smartTextInput.ui.complete}
{ifElse(
computed(() => phase === "error"),
Extraction failed. Try different text or check the format.
,
null,
)}
{ifElse(
hasText,
"Ready to extract",
"Enter some text to extract from",
)}
{ifElse(
showExtractButton,
,
null,
)}
,
null,
)}
{/* Extracting state */}
{ifElse(
computed(() => phase === "extracting"),
Extracting data...
,
null,
)}
{/* Preview state - diff view */}
{ifElse(
computed(() => phase === "preview"),
{/* Simple field list - render flat list of extracted fields */}
Extracted Fields:
{previewText}
{/* Action buttons */}
,
null,
)}
),
inputText,
extractionPrompt,
selections,
};
},
);
export default ExtractorModule;