import React, {useState} from 'react'; import {motion, AnimatePresence} from "framer-motion"; import {Card} from "@/components/ui/card"; import {Button} from "@/components/ui/button"; import {ChevronDown, ChevronRight, Pencil, Plus, Trash2, Notebook} from "lucide-react"; import {Customer, CustomerNote} from "@/services/customers/entities/customer"; import { DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import {Label} from "@/components/ui/label"; import {Textarea} from "@/components/ui/textarea"; import {Tooltip, TooltipContent, TooltipTrigger} from "@/components/ui/tooltip"; type Props = { customer: Customer; handleOpenDialog: (content: React.ReactNode) => void; }; export default function CustomerNotesContent({customer, handleOpenDialog}: Readonly) { const [expandedNotes, setExpandedNotes] = useState([]); const toggleNote = (index: number) => { setExpandedNotes(prev => prev.includes(index) ? prev.filter(i => i !== index) : [...prev, index] ); }; const handleAddNote = () => { handleOpenDialog( Neue Notiz hinzufügen Füge eine neue Notiz für {customer.name} hinzu.