import { Stack, Divider, Text, NumberInput, Group, ColorInput } from "@mantine/core"; import { useTranslation } from "react-i18next"; import { RedactParameters } from "../../../hooks/tools/redact/useRedactParameters"; import WordsToRedactInput from "./WordsToRedactInput"; interface AutomaticRedactSettingsProps { parameters: RedactParameters; onParameterChange: (key: K, value: RedactParameters[K]) => void; disabled?: boolean; } const AutomaticRedactSettings = ({ parameters, onParameterChange, disabled = false }: AutomaticRedactSettingsProps) => { const { t } = useTranslation(); return ( {/* Words to Redact */} onParameterChange('wordsToRedact', words)} disabled={disabled} /> {/* Redaction Settings */} {t('redact.auto.settings', 'Redaction Settings')} {/* Box Color */} {t('redact.auto.colorLabel', 'Box Colour')} onParameterChange('redactColor', value)} disabled={disabled} size="sm" /> {/* Box Padding */} {t('redact.auto.paddingLabel', 'Box Padding')} onParameterChange('customPadding', typeof value === 'number' ? value : 0.1)} min={0} max={10} step={0.1} disabled={disabled} size="sm" placeholder="0.1" /> {/* Use Regex */} {/* Whole Word Search */} {/* Convert PDF to PDF-Image */} ); }; export default AutomaticRedactSettings;