A client-side React component that renders a list of ticket notes with an optional inline input for adding new notes. ## Key Components ### `TicketNotesSectionProps` | Prop | Type | Description | |------|------|-------------| | `notes` | `TicketNote[]` | Array of note objects to display | | `onAddNote` | `(text: string) => void` | Callback when a new note is submitted; omitting it hides the input UI | | `onEditNote` | `(id: string, text: string) => void` | Callback to update an existing note | | `onDeleteNote` | `(id: string) => void` | Callback to remove a note | | `isAddingNote` | `boolean` | Disables input and send button during async submission | | `className` | `string` | Additional CSS classes for the wrapper | ### `TicketNotesSection` The default export. Manages local `noteText` state and exposes two submission paths: - **`Enter` key** (without `Shift`) triggers `handleSend` - **Send button** click triggers `handleSend` Both paths trim whitespace and short-circuit if the input is empty or `isAddingNote` is `true`. ## Usage Example ```typescript import { TicketNotesSection } from "./ticket-notes-section" import type { TicketNote } from "./ticket-note-card" const notes: TicketNote[] = [ { id: "1", text: "Checked network config", author: "Alice", createdAt: "2024-01-10" }, ] function TicketDetail() { const [adding, setAdding] = React.useState(false) const handleAdd = async (text: string) => { setAdding(true) await saveNote(text) setAdding(false) } return ( updateNote(id, text)} onDeleteNote={(id) => removeNote(id)} isAddingNote={adding} /> ) } ``` > **Note:** The add-note input row only renders when `onAddNote` is provided, making the component usable in read-only contexts by simply omitting the prop.