import { useState } from 'react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; import { Database, Download, Upload } from 'lucide-react'; import { ExportFeaturesDialog } from '../board-view/dialogs/export-features-dialog'; import { ImportFeaturesDialog } from '../board-view/dialogs/import-features-dialog'; import { useBoardFeatures } from '../board-view/hooks'; import type { Project } from '@/lib/electron'; interface DataManagementSectionProps { project: Project; } export function DataManagementSection({ project }: DataManagementSectionProps) { const [showExportDialog, setShowExportDialog] = useState(false); const [showImportDialog, setShowImportDialog] = useState(false); // Fetch features and persisted categories using the existing hook const { features, persistedCategories, loadFeatures } = useBoardFeatures({ currentProject: project, }); return ( <>

Data Management

Export and import features to backup your data or share with other projects.

{/* Export Section */}

Export Features

Download all features as a JSON or YAML file for backup or sharing.

{/* Separator */}
{/* Import Section */}

Import Features

Import features from a previously exported JSON or YAML file.

{/* Export Dialog */} {/* Import Dialog */} { loadFeatures(); }} /> ); }