"use client" import { Control, Controller } from "react-hook-form" import { useTranslation } from "@/lib/hooks/use-translation" import { FormSection } from "@/components/ui/form-section" import { CheckboxList } from "@/components/ui/checkbox-list" import { Checkbox } from "@/components/ui/checkbox" import { Transformation } from "@/lib/types/transformations" import { SettingsResponse } from "@/lib/types/api" interface CreateSourceFormData { type: 'link' | 'upload' | 'text' title?: string url?: string content?: string file?: FileList | File notebooks?: string[] transformations?: string[] embed: boolean async_processing: boolean } interface ProcessingStepProps { control: Control transformations: Transformation[] selectedTransformations: string[] onToggleTransformation: (transformationId: string) => void loading?: boolean settings?: SettingsResponse } export function ProcessingStep({ control, transformations, selectedTransformations, onToggleTransformation, loading = false, settings }: ProcessingStepProps) { const { t } = useTranslation() const transformationItems = transformations.map((transformation) => ({ id: transformation.id, title: transformation.title, description: transformation.description })) return (
{settings?.default_embedding_option === 'ask' && ( ( )} /> )} {settings?.default_embedding_option === 'always' && (
{t('sources.embeddingAlways')}

{t('sources.embeddingAlwaysDesc')} {t('sources.changeInSettings')} {t('navigation.settings')}.

)} {settings?.default_embedding_option === 'never' && (
{t('sources.embeddingNever')}

{t('sources.embeddingNeverDesc')} {t('sources.changeInSettings')} {t('navigation.settings')}.

)}
) }