import React from 'react';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label';
import { Checkbox } from '@/components/ui/checkbox';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
import { Textarea } from '@/components/ui/textarea';
import { Input } from '@/components/ui/input';
import { Settings, Zap, Globe, Brain } from 'lucide-react';
const ProcessingOptions = ({
options,
onOptionsChange,
availableEngines = ['tesseract'],
aiAvailable = false,
onProcess,
processing = false
}) => {
const handleEngineChange = (engine, checked) => {
const newEngines = checked
? [...options.engines, engine]
: options.engines.filter(e => e !== engine);
onOptionsChange({ ...options, engines: newEngines });
};
const handleOptionChange = (key, value) => {
onOptionsChange({ ...options, [key]: value });
};
return (
{/* OCR Engines */}
OCR Engines
{availableEngines.map((engine) => (
handleEngineChange(engine, checked)}
/>
))}
{options.engines.length > 1 && (
)}
{/* Language Settings */}
Language Settings
{/* AI Correction */}
AI Enhancement
handleOptionChange('aiCorrection', checked)}
disabled={!aiAvailable}
/>
{options.aiCorrection && aiAvailable && (
)}
{/* External OCR Settings */}
{options.fileType === 'txt' && (
External OCR Settings
handleOptionChange('externalEngine', e.target.value)}
/>
handleOptionChange('confidence', parseFloat(e.target.value) || 85)}
/>
)}
{/* Process Button */}
);
};
export default ProcessingOptions;