/** * @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/aichat/ui/aichatview */ import { type Locale } from "@ckeditor/ckeditor5-utils"; import { View, type BodyCollection } from "@ckeditor/ckeditor5-ui"; import { AIChatFeedView } from "./aichatfeedview.js"; import { AIChatControlsView } from "./aichatcontrolsview.js"; import { AIHeaderView } from "../../aicore/ui/aiheaderview.js"; import { AIDisclaimerView } from "../../aicore/ui/aidisclaimerview.js"; import { type AIContextProvider, type AIContextResourceState } from "../../aichat/model/aichatcontext.js"; /** * Returns the root element of the AI chat the given element is in, or `null` when it is in none. * * Walks up from an element the caller already holds rather than querying the document, which finds nothing when * the chat lives in a shadow root. Views inside the chat use it to resolve the container their floating UI must * stay within – the `limiter` of a balloon panel. */ export declare function getAIChatContainer(element: HTMLElement | null | undefined): HTMLElement | null; /** * The main view of the AI chat plugin. * * It contains the header, feed and controls views. */ export declare class AIChatView extends View { chatHeader: AIHeaderView; chatFeed: AIChatFeedView; chatControls: AIChatControlsView; chatDisclaimer: AIDisclaimerView; constructor(locale: Locale, options: { bodyCollection: BodyCollection; showResizeButton: boolean; contextResourcesSearchInputVisibleFrom?: number; filesEnabled: boolean; }); /** * Populates a source resource balloon with loaded resources. */ populateSourceResourceBalloon(sourceId: string, source: AIContextProvider, resources: Array, uid: string): void; /** * Closes the source resource balloon and cleans up its state. */ closeSourceResourceBalloon(sourceId: string): void; }