import { useTranslate } from '@/hooks/common-hooks'; import { useFormContext } from 'react-hook-form'; import { FormControl, FormField, FormItem, FormLabel, FormMessage, } from './ui/form'; import { Switch } from './ui/switch'; export function ExcelToHtmlFormField() { const form = useFormContext(); const { t } = useTranslate('knowledgeDetails'); return ( { if (typeof field.value === 'undefined') { // default value set form.setValue('parser_config.html4excel', false); } return (
{t('html4excel')}
); }} /> ); }