import * as i0 from '@angular/core';
import { InjectionToken, AfterViewInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, ModuleWithProviders } from '@angular/core';
import * as i1 from '@angular/common';
import { ControlValueAccessor, Validator } from '@angular/forms';
import { Observable } from 'rxjs';

type QuillToolbarConfig = Array<Array<string | {
    indent?: string;
    list?: string;
    direction?: string;
    header?: number | Array<boolean | number>;
    color?: string[];
    background?: string[];
    align?: string[];
    script?: string;
    font?: string[];
    size?: Array<boolean | string>;
}>>;
interface QuillModules {
    [key: string]: any;
    clipboard?: {
        mathers?: any[];
        matchVisual?: boolean;
    } | boolean;
    history?: {
        delay?: number;
        maxStack?: number;
        userOnly?: boolean;
    } | boolean;
    keyboard?: {
        bindings?: any;
    } | boolean;
    syntax?: boolean;
    table?: boolean;
    toolbar?: QuillToolbarConfig | string | {
        container?: string | string[] | QuillToolbarConfig;
        handlers?: {
            [key: string]: any;
        };
    } | boolean;
}
type QuillFormat = 'object' | 'json' | 'html' | 'text';
interface QuillConfig {
    bounds?: HTMLElement | string;
    debug?: 'error' | 'warn' | 'log' | false;
    format?: QuillFormat;
    formats?: any;
    modules?: QuillModules;
    placeholder?: string;
    readOnly?: boolean;
    scrollingContainer?: HTMLElement | string | null;
    theme?: string;
    trackChanges?: 'user' | 'all';
}
interface QuillDynamicConfig {
    /** path for scripts and css e.g. '/assets/quill/' */
    path: string;
}
declare const QUILL_CONFIG_TOKEN: InjectionToken<QuillConfig>;
declare const QUILL_DYNAMIC_CONFIG_TOKEN: InjectionToken<QuillDynamicConfig>;

interface BetterTableModule {
    insertTable(rows: number, columns: number): void;
}
interface ToolbarItemConfig {
    name: string;
    label?: string;
    options?: any[];
    dialogMessage?: string;
}
type EditorChangeContent = ContentChange & {
    event: 'text-change';
};
type EditorChangeSelection = SelectionChange & {
    event: 'selection-change';
};
interface Focus {
    editor: any;
    source: string;
}
interface Range {
    index: number;
    length: number;
}
interface ContentChange {
    content: any;
    delta: any;
    editor: any;
    html: string | null;
    oldDelta: any;
    source: string;
    text: string;
}
interface SelectionChange {
    editor: any;
    oldRange: Range | null;
    range: Range | null;
    source: string;
}
interface Blur {
    editor: any;
    source: string;
}

interface CustomOption {
    import: string;
    whitelist: any[];
}
declare class QuillEditorComponent implements AfterViewInit, ControlValueAccessor, OnChanges, OnDestroy, Validator {
    quillEditor: any;
    editorElem: HTMLElement | undefined;
    content: any;
    protected loaded: boolean;
    id: string;
    format?: 'object' | 'html' | 'text' | 'json';
    theme?: string;
    modules?: QuillModules;
    debug?: 'warn' | 'log' | 'error' | false;
    placeholder?: string;
    maxLength?: number;
    minLength?: number;
    formats?: string[] | null;
    customToolbarPosition: 'top' | 'bottom';
    styles: any;
    scrollingContainer?: HTMLElement | string | null;
    bounds?: HTMLElement | string;
    customOptions: CustomOption[];
    trackChanges?: 'user' | 'all';
    hasImageFeature: boolean;
    onEditorCreated: EventEmitter<any>;
    onContentChanged: EventEmitter<ContentChange>;
    onSelectionChanged: EventEmitter<SelectionChange>;
    onFocus: EventEmitter<{
        editor: any;
        source: string;
    }>;
    onBlur: EventEmitter<{
        editor: any;
        source: string;
    }>;
    readOnly?: boolean;
    required: boolean;
    sanitize: boolean;
    strict: boolean;
    preserveWhitespace: boolean;
    private disabled;
    private elementRef;
    private domSanitizer;
    private doc;
    private platformId;
    private renderer;
    private zone;
    private config;
    private loader;
    onModelChange(_modelValue?: any): void;
    onModelTouched(): void;
    valueGetter: (quillEditor: any, editorElement: HTMLElement) => string | any;
    valueSetter: (quillEditor: any, value: any) => any;
    ngAfterViewInit(): void;
    selectionChangeHandler: (range: Range | null, oldRange: Range | null, source: string) => void;
    textChangeHandler: (delta: any, oldDelta: any, source: string) => void;
    ngOnDestroy(): void;
    ngOnChanges(changes: SimpleChanges): void;
    writeValue(currentValue: any): void;
    setDisabledState(isDisabled?: boolean): void;
    registerOnChange(fn: (modelValue: any) => void): void;
    registerOnTouched(fn: () => void): void;
    validate(): any;
    /**
     * Override the default Quill scroll behavior to take into account the formats array and skip non-found ones. Then
     * registers the plugin to the Quill editor.
     *
     * @param QuillInstance The Quill class (not the instance)
     * @private
     */
    private overrideScrollBehavior;
    static ɵfac: i0.ɵɵFactoryDeclaration<QuillEditorComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QuillEditorComponent, "quill-editor", never, { "id": { "alias": "id"; "required": false; }; "format": { "alias": "format"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "modules": { "alias": "modules"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "formats": { "alias": "formats"; "required": false; }; "customToolbarPosition": { "alias": "customToolbarPosition"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "scrollingContainer": { "alias": "scrollingContainer"; "required": false; }; "bounds": { "alias": "bounds"; "required": false; }; "customOptions": { "alias": "customOptions"; "required": false; }; "trackChanges": { "alias": "trackChanges"; "required": false; }; "hasImageFeature": { "alias": "hasImageFeature"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "sanitize": { "alias": "sanitize"; "required": false; }; "strict": { "alias": "strict"; "required": false; }; "preserveWhitespace": { "alias": "preserveWhitespace"; "required": false; }; "valueGetter": { "alias": "valueGetter"; "required": false; }; "valueSetter": { "alias": "valueSetter"; "required": false; }; }, { "onEditorCreated": "onEditorCreated"; "onContentChanged": "onContentChanged"; "onSelectionChanged": "onSelectionChanged"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, never, ["[quill-editor-toolbar]"], true, never>;
    static ngAcceptInputType_readOnly: unknown;
    static ngAcceptInputType_required: unknown;
    static ngAcceptInputType_sanitize: unknown;
    static ngAcceptInputType_strict: unknown;
    static ngAcceptInputType_preserveWhitespace: unknown;
}

/**
 * @deprecated please don't use it. It will be removed
 */
declare class QuillModule {
    static forRoot(config?: QuillConfig): ModuleWithProviders<QuillModule>;
    static ɵfac: i0.ɵɵFactoryDeclaration<QuillModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<QuillModule, never, [typeof i1.CommonModule, typeof QuillEditorComponent], [typeof QuillEditorComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<QuillModule>;
}

declare const defaultModules: {
    toolbar: (string[] | {
        header: number;
    }[] | {
        list: string;
    }[] | {
        script: string;
    }[] | {
        indent: string;
    }[] | {
        direction: string;
    }[] | {
        size: (string | boolean)[];
    }[] | {
        header: (number | boolean)[];
    }[] | ({
        color: any[];
        background?: undefined;
    } | {
        background: any[];
        color?: undefined;
    })[] | {
        font: any[];
    }[] | {
        align: any[];
    }[])[];
};

/**
 * @internal This service is not part of the public API of the component
 */
declare class LoaderService {
    private dynamicConfig;
    /**
     * Load the Quill.js library
     *
     * @param path Path to the Quill.js library e.g. "assets/quill/dist". The path must contain the "quill.js"
     * and "quillEditor.min.css" files and also the css ones.
     */
    load(): Observable<boolean>;
    static ɵfac: i0.ɵɵFactoryDeclaration<LoaderService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<LoaderService>;
}

export { LoaderService, QUILL_CONFIG_TOKEN, QUILL_DYNAMIC_CONFIG_TOKEN, QuillEditorComponent, QuillModule, defaultModules };
export type { BetterTableModule, Blur, ContentChange, CustomOption, EditorChangeContent, EditorChangeSelection, Focus, QuillConfig, QuillDynamicConfig, QuillFormat, QuillModules, QuillToolbarConfig, Range, SelectionChange, ToolbarItemConfig };
//# sourceMappingURL=eui-components-externals-quill.d.ts.map
