/** * @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/aisuggestioncontentpartstateview */ import { View } from "@ckeditor/ckeditor5-ui"; import { type Locale } from "@ckeditor/ckeditor5-utils"; import { type AIReplyChangeGroupState, type AIReplyChangeGroupOutdatedReason } from "../../model/aireply.js"; import { type AISuggestionContentPartTranslationKeys } from "../../utils/contentparttranslationkeys.js"; export type AISuggestionContentPartState = "accepted" | "rejected" | "outdated"; export declare const ICON_STATE_MAP: Record; /** * A view that displays the state of a single part in the suggestion content. */ export declare class AISuggestionContentPartStateView extends View { state: AISuggestionContentPartState; outdatedReason: AIReplyChangeGroupOutdatedReason | undefined; isVisible: boolean; /** * Size tier of the state pill. Use `'large'` when the pill takes the place of regular-sized buttons. * * @observable * @default 'small' */ size: "small" | "large"; /** * Whether the pill pops in when it is shown, to confirm a decision the user has just made. * * @observable * @default false */ isAnimated: boolean; constructor(locale: Locale, translationKeys?: AISuggestionContentPartTranslationKeys); /** * Sets the state of the view. */ setState(state: keyof typeof ICON_STATE_MAP, outdatedReason?: AIReplyChangeGroupOutdatedReason): void; } /** * Checks whether a change of state is a decision made on a pending change, that is, whether it got accepted or rejected. * Only such a change of state is confirmed with the pill popping in (see * {@link module:ai/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview~AISuggestionContentPartStateView#isAnimated}). * A change that went outdated was not decided on: its content changed under it. */ export declare function isDecisionMade(oldState: AIReplyChangeGroupState, newState: AIReplyChangeGroupState): boolean;