/** * @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'; import '../../../theme/aireviewcore/aireviewcore-check-run.css'; import '../../../theme/aireviewcore/aireviewcore-check-run-result.css'; 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' | undefined; constructor(locale: Locale, contents: AIReviewCoreUICheckResultsViewContents); clearResults(): void; getResults(): ViewCollection; addResult(result: { contentDiffed: string; id: string; }): 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; showGeneralErrorMessage(): void; resetErrorState(): 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; } ]; };