import { useState } from 'react'; import { ChevronRight, FileText } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { AIMaterial } from '../../types/ai-writing'; import { MaterialItem } from './MaterialItem'; import { CollapseTransition } from './CollapseTransition'; interface MaterialsCardProps { materials: AIMaterial[]; selectedIds: Set; onToggle: (id: string) => void; } export function MaterialsCard({ materials, selectedIds, onToggle }: MaterialsCardProps) { const [expanded, setExpanded] = useState(false); return (
{/* 折叠头 */} {/* 列表 */}
{materials.length === 0 ? (

暂无素材

) : ( materials.map((m) => ( )) )}
); }