import { EventData } from "../../components/app_context"; import ReactBasicWidget from "../react/ReactBasicWidget"; import Modal from "../react/Modal"; import { t } from "../../services/i18n"; import Button from "../react/Button"; import { useRef, useState } from "preact/hooks"; import { RawHtmlBlock } from "../react/RawHtml"; import useTriliumEvent from "../react/hooks"; function ShowInfoDialogComponent() { const [ opts, setOpts ] = useState>(); const [ shown, setShown ] = useState(false); const okButtonRef = useRef(null); useTriliumEvent("showInfoDialog", (opts) => { setOpts(opts); setShown(true); }); return ( { opts?.callback?.(); setShown(false); }} onShown={() => okButtonRef.current?.focus?.()} footer={