/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * @module ai/aireviewcore/utils/openleaveconfirmationdialog */ import { type Editor } from "@ckeditor/ckeditor5-core"; import { type AILeaveConfirmationOptions } from "../aireviewcoreui.js"; import { type View } from "@ckeditor/ckeditor5-ui"; /** * Opens the leave-confirmation dialog. Calls `onExit` if the user confirms leaving, or `onStay` once the * dialog is dismissed any other way (the stay button, the close button, or the Esc key). * * Goes through `AIEditorIntegration#dialog` rather than resolving `Dialog` directly: `Dialog` is a * `Plugin`, not a `ContextPlugin`, so a `ContextPlugin` caller can't declare it in `requires` * (`PluginCollection#checkContextPlugin()` throws `plugincollection-context-required` otherwise). * `AIEditorIntegration` already depends on `Dialog` directly and proxies it here. Degrades gracefully * (leave proceeds unconfirmed) for the unlikely case `AIEditorIntegration` isn't loaded on the focused editor. */ export declare function openLeaveConfirmationDialog(editor: Editor, options: AILeaveConfirmationOptions, contentView: View, onExit: () => void, onStay?: () => void): void;