'use client'; import { useState, useEffect } from 'react'; interface ExportModalProps { isOpen: boolean; onClose: () => void; onExport: (includeSearchHistory: boolean, includeWatchHistory: boolean) => void; } export function ExportModal({ isOpen, onClose, onExport }: ExportModalProps) { const [includeSearchHistory, setIncludeSearchHistory] = useState(true); const [includeWatchHistory, setIncludeWatchHistory] = useState(true); useEffect(() => { if (isOpen) { setIncludeSearchHistory(true); setIncludeWatchHistory(true); } }, [isOpen]); const handleExport = () => { onExport(includeSearchHistory, includeWatchHistory); onClose(); }; if (!isOpen) return null; return ( <> {/* Backdrop */}
{/* Modal */}选择要导出的内容:
{/* Checkbox for Search History */} {/* Checkbox for Watch History */}