/**
* @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 code-block/converters
*/
import type { GetCallback } from "@ckeditor/ckeditor5-utils";
import type { DowncastInsertEvent, Model, UpcastElementEvent, UpcastTextEvent, EditingView } from "@ckeditor/ckeditor5-engine";
import type { CodeBlockLanguageDefinition } from "./codeblockconfig.js";
/**
* A model-to-view (both editing and data) converter for the `codeBlock` element.
*
* Sample input:
*
* ```html
*
foo();
bar();
* ```
*
* Sample output (data, see {@link module:code-block/converters~modelToDataViewSoftBreakInsertion}):
*
* ```html
* foo();\nbar();
* ```
*
* @param languageDefs The normalized language configuration passed to the feature.
* @param useLabels When `true`, the `` element will get a `data-language` attribute with a * human–readable label of the language. Used only in the editing. * @returns Returns a conversion callback. * @internal */ export declare function modelToViewCodeBlockInsertion(model: Model, languageDefs: Array, useLabels?: boolean): GetCallback ; /** * A model-to-data view converter for the new line (`softBreak`) separator. * * Sample input: * * ```html * foo(); * ``` * * Sample output: * * ```html *bar(); * ``` * * @returns Returns a conversion callback. * @internal */ export declare function modelToDataViewSoftBreakInsertion(model: Model): GetCallbackfoo();\nbar();; /** * A view-to-model converter for ` ` with the `` HTML. * * Sample input: * * ```html ** ``` * * Sample output: * * ```html *foo();bar();foo();bar(); * ``` * * @param languageDefs The normalized language configuration passed to the feature. * @returns Returns a conversion callback. * @internal */ export declare function dataViewToModelCodeBlockInsertion(editingView: EditingView, languageDefs: Array): GetCallback ; /** * A view-to-model converter for new line characters in ` `. * * Sample input: * * ```html ** ``` * * Sample output: * * ```html *foo();\nbar();foo(); * ``` * * @returns {Function} Returns a conversion callback. * @internal */ export declare function dataViewToModelTextNewlinesInsertion(): GetCallbackbar(); ; /** * A view-to-model converter that handles orphan text nodes (white spaces, new lines, etc.) * that surround ` ` inside ``. * * Sample input: * * ```html * // White spaces ** * // White spaces *foo()* * // White spaces *foo()* * // New lines *foo()** * // Redundant text *foo()*ABC* ``` * * Unified output for each case: * * ```html *foo()DEFfoo() * ``` * * @returns Returns a conversion callback. * @internal */ export declare function dataViewToModelOrphanNodeConsumer(): GetCallback;