import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { AbstractControl, ControlContainer, ControlValueAccessor } from '@angular/forms';
import { Editor, Toolbar } from 'ngx-editor';
import { QdFormsActionEmitterService } from '../shared/services/action-emitter.service';
import { QdRichtextConfig } from '../model/forms.interface';
import * as i0 from "@angular/core";
/**
 * **QdRichtext** component provides a FormElement.
 * The **QdRichtext** is a component that provides a form element for a richtext editor.<br />
 * It supports bold, italic, underline, strike, bullet points and ordered list.
 * It can be used with Quadrel Reactive Forms or with model binding.
 *
 * ####**Usage with Reactive Forms**
 *
 * ```ts
 * form = new QdFormGroup({
 *   richtext: new QdFormControl()
 * });
 * ```
 * ```html
 * <form [formGroup]="form">
 *   <qd-richtext [formControlName]="richtext" [config]="config"></qd-richtext>
 * </form>
 * ```
 *
 * ####**Usage with Model Binding**
 * ```ts
 * value;
 * ```
 * ```html
 * <qd-richtext [(value)]="value" [config]="config"></qd-richtext>
 * ```
 */
export declare class QdRichtextComponent implements OnInit, OnDestroy, ControlValueAccessor {
    private readonly controlContainer;
    private readonly actionEmitterService;
    /**
     * The current form control name can be assigned here if you want to use Reactive Forms.
     */
    formControlName?: string;
    /**
     * The form item value, if you are working with Model Binding.
     *
     * @example
     * <qd-richtext [(value)]="value" [config]="config"></qd-richtext>
     */
    value: string;
    /**
     * The configuration for this form item
     *
     * @example
     * {
     *   label: { i18n: 'Qd-Forms Richtext' },
     *   hint: { i18n: 'Helpertext' },
     *   disabled: false,
     *   placeholder: {
     *     i18n: 'write something...'
     *   }
     * };
     */
    config?: QdRichtextConfig;
    /**
     * A static test ID for integration tests can be set. <br />
     * The value for the HTML attribute [data-test-id].
     */
    testId: string;
    /**
     * Emits event when the value changes. Return value matches the current html value.
     */
    readonly valueChange: EventEmitter<string>;
    /**
     * Emits event when the hint is clicked/tapped. `hintAction` must be set to `true` for this.
     */
    readonly clickHint: EventEmitter<any>;
    /**
     * Emits event when the readonly value is clicked/tapped. `clickReadonly ` must be set to `true` for this.
     */
    readonly clickReadonly: EventEmitter<any>;
    /**
     * Emits event when the viewonly value is clicked/tapped. `clickViewonly ` must be set to `true` for this.
     */
    readonly clickViewonly: EventEmitter<any>;
    get hasError(): boolean;
    get isDisabled(): boolean;
    /**
     * The plain text value stripped of html tags
     */
    plainTextValue: string;
    control?: AbstractControl;
    editor: Editor;
    toolbar: Toolbar;
    private _subs;
    private _onChanged;
    private _onTouched;
    constructor(controlContainer: ControlContainer, actionEmitterService: QdFormsActionEmitterService);
    ngOnInit(): void;
    ngOnDestroy(): void;
    get maxLength(): number | undefined;
    get hasMaxLength(): boolean;
    writeValue(value: string): void;
    registerOnChange(fn: any): void;
    registerOnTouched(fn: any): void;
    change(value: string): void;
    handleReadonly(): void;
    handleViewonly(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<QdRichtextComponent, [{ optional: true; host: true; skipSelf: true; }, null]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QdRichtextComponent, "qd-richtext", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "value": { "alias": "value"; "required": false; }; "config": { "alias": "config"; "required": false; }; "testId": { "alias": "data-test-id"; "required": false; }; }, { "valueChange": "valueChange"; "clickHint": "clickHint"; "clickReadonly": "clickReadonly"; "clickViewonly": "clickViewonly"; }, never, never, false, never>;
}
//# sourceMappingURL=richtext.component.d.ts.map