/** * @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/ui/aireviewcoreuicheckresultsview */ import { type Locale } from "@ckeditor/ckeditor5-utils"; import { ListItemView, ViewCollection } from "@ckeditor/ckeditor5-ui"; import { type AIReviewCheckResultChange } from "../model/aireviewcheckresultchange.js"; import { AIDisclaimerView } from "../../aicore/ui/aidisclaimerview.js"; import { AIReviewCoreReviewCheckListItemResultsView } from "./aireviewcorechecklistitemresultview.js"; export type AIReviewCoreUICheckResultsViewContents = { generalErrorText: string; }; export declare class AIReviewCoreUICheckResultsView extends ListItemView { /** * The disclaimer view shown below the results. */ reviewDisclaimer: AIDisclaimerView; /** * The title of the current check results. * * @observable */ headerTitle: string; /** * The subtitle of the current check results. * * @observable */ headerSubtitle: string; /** * The loading state of the controls. * * @observable */ isLoading: boolean; /** * The toggle diff state of the controls. * * @observable */ isToggleDiffOn: boolean; /** * Indicates whether the review is completed. * * @observable */ isCompleted: boolean; /** * Indicates whether the results are ready and can be interacted with. * * @observable */ isResultReady: boolean; isError: boolean; showErrorMessage: boolean; errorType: "chunk" | "general" | "unsupported-inline" | undefined; /** * Whether "accept all" is enabled — pushed by the controller. Combined with the panel's own error state. * * @observable */ isAcceptAllEnabled: boolean; constructor(locale: Locale, contents: AIReviewCoreUICheckResultsViewContents); clearResults(): void; getResults(): ViewCollection; addResult(result: AIReviewCheckResultChange): void; hideResult(id: string, status: AIReviewCheckResultChange["status"]): void; showResult(id: string, status: AIReviewCheckResultChange["status"]): void; /** * Sets the title of the current check results. * * @param title The title to set in the header. */ setTitle(title: string, subtitle?: string): void; showChunkErrorMessage(): void; showUnsupportedInlineChangeMessage(): void; showGeneralErrorMessage(): void; resetErrorState(): void; setAcceptAllEnabled(isEnabled: boolean): void; } export type AIAbortReviewStreamEvent = { name: "abortReviewStream"; args: []; }; export type AILeaveReviewCoreResultListEvent = { name: "leaveReviewCoreResultList"; args: []; }; export type AIAcceptAllChangesEvent = { name: "acceptAllChanges"; args: []; }; export type AIToggleDiffEvent = { name: "toggleDiff"; args: [{ on: boolean; }]; };