import * as React from "bloatless-react"; import { Chat, MessageObject } from "../../Model/chatModel"; import { translation } from "../../translations"; export function ObjectDetailModal( chat: Chat, messageObject: MessageObject, isPresented: React.State ) { function closeModal() { isPresented.value = false; } function saveAndClose() { messageObject.title = editingTitle.value; chat.updateObject(messageObject.id, {}); closeModal(); } function deleteAndClose() { chat.deleteObject(messageObject); closeModal(); } const editingTitle = new React.State(messageObject.title); return ( ); }