Spaces:
Sleeping
Sleeping
File size: 1,137 Bytes
f871fed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
"use client"
import { FormSection } from "@/components/ui/form-section"
import { CheckboxList } from "@/components/ui/checkbox-list"
import { NotebookResponse } from "@/lib/types/api"
interface NotebooksStepProps {
notebooks: NotebookResponse[]
selectedNotebooks: string[]
onToggleNotebook: (notebookId: string) => void
loading?: boolean
}
export function NotebooksStep({
notebooks,
selectedNotebooks,
onToggleNotebook,
loading = false
}: NotebooksStepProps) {
const notebookItems = notebooks.map((notebook) => ({
id: notebook.id,
title: notebook.name,
description: notebook.description || undefined
}))
return (
<div className="space-y-6">
<FormSection
title="Select Notebooks (optional)"
description="Choose which notebooks should contain this source. You can select multiple notebooks or leave this empty."
>
<CheckboxList
items={notebookItems}
selectedIds={selectedNotebooks}
onToggle={onToggleNotebook}
loading={loading}
emptyMessage="No notebooks found."
/>
</FormSection>
</div>
)
} |