import { Button, Card, Group, Loader, Modal, Stack, Text, Textarea, Tooltip, UnstyledButton, } from "@mantine/core"; import { IconPencil, IconX } from "@tabler/icons-react"; import { useState } from "react"; import { useDisclosure } from "@mantine/hooks"; import { usePatchFlight } from "@/util/hooks"; export function TextLogItem({ label, content, id = "", field = "", }: { label: string; content: string | null; id?: string; field?: string; }) { const [editValue, setEditValue] = useState(content ?? ""); const [editOpened, { open: openEdit, close: closeEdit }] = useDisclosure(false); const updateValue = usePatchFlight(id, field, closeEdit); const editForm = (