import { CustomElementDefinition, EditorUiType, FormComponent, Languages } from '@limetech/lime-elements';
import { LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
import { EventEmitter } from '../../stencil-public-runtime';
import { TriggerMap } from './text-editor.types';
import { EnhancedEditorMetadata } from './uploader/building-blocks-upload-handler';
/**
 * This component is a wrapper on the `limel-text-editor`. It adds support for platform
 * specific things that can't reside in lime-elements. So this is basically an
 * invocation of the text editor with support for mentions.
 *
 * A mention is practically an inserted <limebb-mention /> tag that will visually show
 * the mention in the text editor but will also trigger the creation of a mention on
 * the server side if saved together with a text field in a limeobject.
 *
 * The mention will always point towards a limeobject with the combination of a limetype
 * that has the label USER and an object id.
 *
 * :::note
 * To enable mentions, the feature switch `useNotifications` needs to be enabled.
 * :::
 *
 * @exampleComponent limebb-example-text-editor-basic
 * @exampleComponent limebb-example-text-editor-as-form-component
 * @exampleComponent limebb-example-text-editor-composite
 * @exampleComponent limebb-example-text-editor-allow-resize
 * @exampleComponent limebb-example-text-editor-focus
 * @exampleComponent limebb-example-text-editor-many-picker-items
 * @beta
 */
export declare class LimeBBTextEditor implements FormComponent<string> {
    /**
     * @inheritdoc
     */
    platform: LimeWebComponentPlatform;
    /**
     * @inheritdoc
     */
    context: LimeWebComponentContext;
    /**
     * Set to true to enable mentioning a coworker or groups of coworkers.
     *
     * Mentions already present will still be rendered with a link to the coworker or
     * the group of coworkers regardless of the value of this property
     */
    allowMentioning: boolean;
    /**
     * The type of content that the editor should handle and emit, defaults to `markdown`
     *
     * Assumed to be set only once, so not reactive to changes
     */
    contentType: 'markdown' | 'html';
    /**
     * Defines the language for translations.
     */
    language: Languages;
    /**
     * Set to `true` to disable the field.
     * Use `disabled` to indicate that the field can normally be interacted
     * with, but is currently disabled. This tells the user that if certain
     * requirements are met, the field may become enabled again.
     */
    disabled?: boolean;
    /**
     * Set to `true` to make the component read-only.
     * Use `readonly` when the field is only there to present the data it holds,
     * and will not become possible for the current user to edit.
     * :::note
     * Consider that it might be better to use `limel-markdown`
     * instead of `limel-text-editor` when the goal is visualizing data.
     * :::
     */
    readonly?: boolean;
    /**
     * Optional helper text to display below the input field when it has focus
     */
    helperText?: string;
    /**
     * The placeholder text shown inside the input field,
     * when the field is empty.
     */
    placeholder?: string;
    /**
     * The label of the editor
     */
    label?: string;
    /**
     * Set to `true` to indicate that the current value of the editor is
     * invalid.
     */
    invalid?: boolean;
    /**
     * Set to `true` to indicate that the field is required.
     *
     * :::important
     * An empty but required field is not automatically considered invalid.
     * You must make sure to check the validity of the field on your own,
     * and properly handle the `invalid` state.
     * :::
     */
    required?: boolean;
    /**
     * Context of the selected object in the list
     */
    selectedContext?: LimeWebComponentContext;
    /**
     * Specifies the visual appearance of the editor.
     *
     * - `standard`: The default editor appearance with a full toolbar and
     * standard layout.
     * - `minimal`: A compact editor appearance, ideal for limited space
     * scenarios such as mobile devices. In this mode, the toolbar is hidden
     * until the editor is focused.
     */
    ui?: EditorUiType;
    /**
     * Set to `true` to allow the user to vertically resize the editor.
     * Set to `false` to disable the resize functionality.
     */
    allowResize: boolean;
    value: string;
    /**
     * A unique string identifier for this text editor instance.
     *
     * This identifier is used to manage and persist draft data in the user
     * data repository. It allows distinguishing between different text editor
     * instances within the same or different contexts. The identifier should
     * be consistent across sessions where the same instance is being used but
     * should differ for distinct instances.
     *
     * ### Use Cases
     * - **Shared Contexts:** For example, if a text editor is used in the
     * activity feed on both the Overview tab and the Activities tab, the
     * identifier should remain the same to ensure that drafts are preserved
     * between these tabs.
     * - **Distinct Contexts:** If there are multiple text editors within the
     * same view (e.g., one for the activity feed and another for a description
     * field), each editor should have a unique identifier to avoid
     * cross-contamination of draft data.
     *
     * ### Implementation Notes
     * - If no value is provided by the consumer, the draft functionality will
     * be disabled. No draft data will be loaded and no draft will be saved.
     * - The current limeobject ID and limetype name are always included
     * automatically in the final identifier. This means that the same text
     * editor instance in two different limeobjects will have a different
     * draft identifier and will not affect each other's draft data.
     *
     * :::note
     * If the `value` property is set to any truthy value, the text editor
     * will not load any draft data. It _will_ still save a draft, but if the
     * `value` property is still set to a truthy value next time the editor is
     * loaded, the draft will not be loaded.
     * :::
     *
     * @example
     * ```typescript
     * <limebb-text-editor
     *     draftIdentifier="activity-feed-editor"
     *     value=""
     * ></limebb-text-editor>
     * ```
     */
    draftIdentifier: string;
    triggerMap: TriggerMap;
    customElements: CustomElementDefinition[];
    /**
     * Enables image pasting in the editor.
     * Default: `false`
     *
     * :::note
     * This component handles the upload process.
     * The consumer must process the uploaded images by listening to `metadataChange` event.
     * :::
     */
    allowInlineImages: boolean;
    private items;
    private highlightedItemIndex;
    private editorPickerQuery;
    private searchableLimetypes;
    /**
     * Open state of the picker
     */
    private isPickerOpen;
    /**
     * Loading state of the picker
     */
    private isSearching;
    private readonly host;
    /**
     * Dispatched when a change is made to the editor
     */
    change: EventEmitter<string>;
    /**
     * Dispatched when the metadata of the editor changes
     */
    metadataChange: EventEmitter<EnhancedEditorMetadata>;
    private registeredTriggers;
    private registeredTriggerMap;
    private registeredCustomElements;
    private activeTrigger;
    private triggerFunction?;
    private readonly portalId;
    private pickerMessage;
    private textEditor;
    private textEditorPickerElement;
    private textEditorInnerId;
    private debouncedSearchFn;
    private uploadHandler;
    protected watchOpen(): void;
    protected watchQuery(): void;
    constructor();
    connectedCallback(): void;
    componentWillLoad(): void;
    disconnectedCallback(): void;
    private registerMentions;
    private registerTriggers;
    private setPickerMessage;
    private setupHandlers;
    private readonly handleMouseClick;
    private readonly handleKeyPress;
    private readonly handleArrowKeyPress;
    private readonly findNonSeparatorIndex;
    private isListSeparator;
    private readonly handleEscapeKey;
    private readonly handleEnterOrTabKey;
    render(): any[];
    private renderPicker;
    private readonly handleMetadataChange;
    private getEnhancedImages;
    private readonly handleImagePasted;
    private readonly handleTriggerStart;
    private readonly handleTriggerStop;
    private readonly handleTriggerChange;
    private readonly resetTriggerAndPicker;
    private readonly handleItemSelection;
    private loadDraft;
    private readonly handleVisibilityChange;
    private readonly handleBeforeUnload;
    private saveDraft;
    private get userDataService();
}
//# sourceMappingURL=text-editor.d.ts.map