import { TextAttributes } from "@opentui/core" import { Keymap } from "../context/keymap" import { useTheme } from "../context/theme" import { useDialog, type DialogContext } from "./dialog" export function DialogExportResult(props: { path: string; onClose?: () => void }) { const dialog = useDialog() const { themeV2 } = useTheme().contextual("elevated") const close = () => { props.onClose?.() dialog.clear() } Keymap.createLayer(() => ({ mode: "modal", commands: [ { bind: "return", title: "Close export result", group: "Dialog", run: close, }, ], })) return ( Session exported esc {props.path} Close ) } DialogExportResult.show = (dialog: DialogContext, path: string) => new Promise((resolve) => { dialog.replace(() => , resolve) })