/** * @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/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview */ import { View } from "@ckeditor/ckeditor5-ui"; import { type AISuggestionActionName } from "../../../aichat/ui/feed/aichatfeedsuggestionitemactionsview.js"; import { type AISuggestionContentPartDefinition } from "../../utils/getsuggestionpartsfromreply.js"; import { type Locale } from "@ckeditor/ckeditor5-utils"; import { AISuggestionContentPartToolbarView } from "./aisuggestioncontentparttoolbarview.js"; import { type AIReplyChangeGroupState, type AIReplyChangeGroupOutdatedReason } from "../../model/aireply.js"; /** * A view that displays the header of a single part in the suggestion content. * * Includes: * * The toolbar, * * The title label, * * The state view. */ export declare class AISuggestionContentPartHeaderView extends View { /** * The state of the content part (pending, accepted, rejected, etc.). It is reflected in the {@link #stateView} view. */ state: AIReplyChangeGroupState; /** * For the `'outdated'` {@link #state}, the reason that selects the {@link #stateView} pill's tooltip. */ outdatedReason: AIReplyChangeGroupOutdatedReason | undefined; /** * Controls whether the content part is enabled, which means that it can be interacted with. It affects the interactivity * of the {@link #toolbarView} buttons. */ isEnabled: boolean; /** * The view that displays the toolbar for the content part ("Apply", "Suggest", "Reject"). */ toolbarView: AISuggestionContentPartToolbarView; /** * Observable property that indicates whether the track changes feature is on. */ isTrackChangesOn: boolean; /** * Whether the target editor is read-only. Forwarded to the toolbar to disable the write actions (apply, * suggest) while keeping the reject action available. * * @observable */ isTargetReadOnly: boolean; constructor(locale: Locale, { part, uiIndex, availableActions, areActionsDisabled }: { part: AISuggestionContentPartDefinition; uiIndex: number; availableActions: Array; areActionsDisabled?: boolean; }); }