import { nothing, TemplateResult, PropertyValueMap } from 'lit';
import { Ref } from 'lit/directives/ref.js';
import { MeetingType } from '../types/meetings.types';
import { MutationController } from '../controllers/mutation-controller';
import { BlobType, ExternalBlobType, FileMutationContextType, FileType, MutateFileProps } from '../types/files.types';
import { MutationStateController } from '../controllers/mutation-state-controller';
import { MutationState } from '@tanstack/query-core';
import { default as WeavyCloudFiles } from './wy-cloud-files';
import { ExternalBlobMutationType } from '../data/blob-external';
import { PollOptionType } from '../types/polls.types';
import { EmbedType } from '../types/embeds.types';
import { DropZoneController } from '../controllers/dropzone-controller';
import { EditorView, KeyBinding } from '@codemirror/view';
import { Compartment, Extension } from '@codemirror/state';
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
import { WeavySubComponent } from '../classes/weavy-sub-component';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
import { MetadataType } from '../types/lists.types';
import { DropFilesEventType } from '../types/files.events';
import { EmbedRemoveEventType } from '../types/embeds.events';
export default class WyEditor extends WeavySubComponent {
    static styles: import('lit').CSSResult;
    protected exportParts: ShadowPartsController;
    protected storage: Storage | undefined;
    disabled: boolean;
    parentId?: number;
    private _placeholder;
    get placeholder(): string;
    set placeholder(placeholder: string);
    text?: string;
    metadata?: MetadataType;
    embed?: EmbedType;
    options?: PollOptionType[];
    attachments: FileType[];
    buttonText: string;
    typing: boolean;
    draft: boolean;
    editorType: "messages" | "posts" | "comments";
    editorClass: string;
    editorLocation: "messages" | "posts" | "apps" | "files";
    selectAllContent(): void;
    setCursorLast(): void;
    focusInput(): void;
    protected meeting?: MeetingType;
    protected editorError: boolean;
    protected showPolls: boolean;
    protected pollOptions: PollOptionType[];
    protected embeds: EmbedType[];
    protected draftKey: string;
    protected mutationAppId?: number;
    protected uploadBlobMutation: MutationController<BlobType, Error, MutateFileProps, FileMutationContextType>;
    protected mutatingFiles: MutationStateController<BlobType | FileType, Error, MutateFileProps, FileMutationContextType>;
    protected externalBlobMutation?: ExternalBlobMutationType;
    protected fileInputRef: Ref<HTMLInputElement>;
    protected cloudFilesRef: Ref<WeavyCloudFiles>;
    protected dropZone: DropZoneController;
    protected keyMap: KeyBinding[];
    protected editorExtensions?: Extension[];
    protected editorEditable?: Compartment;
    protected editorPlaceholder?: Compartment;
    protected placeholderExtension?: (content: string | HTMLElement | ((view: EditorView) => HTMLElement)) => Extension;
    protected EditorView?: typeof EditorView;
    protected editor?: EditorView;
    protected editorRef: Ref<HTMLElement>;
    protected editorInitialized: boolean;
    private throttledTyping;
    protected authWindow?: WindowProxy | null;
    private throttledDrafting;
    constructor();
    willUpdate(changedProperties: PropertyValueMap<this>): void;
    protected updated(changedProperties: PropertyValueMap<this>): void;
    setPlaceHolderText(): void;
    setEditable(): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected handleRemoveMeeting(): void;
    protected autocomplete(context: CompletionContext): Promise<CompletionResult | null>;
    protected openFileInput: () => void;
    protected openCloudFiles: () => void;
    protected handleDropFiles(e: DropFilesEventType): void;
    protected handleUploadFiles(files: File[] | FileList | null, input?: HTMLInputElement): Promise<void>;
    protected handleExternalBlobs(externalBlobs: ExternalBlobType[] | null): void;
    protected handleRemoveUpload(mutation: MutationState<BlobType, Error, MutateFileProps, FileMutationContextType>): void;
    protected saveDraft(): void;
    protected handleRemoveAttachment(attachment: FileType): void;
    protected submit(): void;
    protected resetEditor(): void;
    protected clearEditor(): void;
    private createMeeting;
    protected handleMeetingClick(name: string): Promise<void>;
    protected setEmbeds(embed: EmbedType): void;
    protected handleEmbeds(content: string): void;
    protected removeEmbed(e: EmbedRemoveEventType): void;
    protected swapEmbed(): void;
    protected openPolls(): void;
    protected handlePollOptionChange(e: Event, index: number): void;
    protected handlePollOptionAdd(e: Event, index: number): void;
    /**
     * Editor loading fallback dummy.
     * Hard copy of the rendered nodes when the editor is empty. Cleaned up to not be editable.
     */
    protected renderEditorDummy(): TemplateResult | typeof nothing;
    protected renderTopSlot(): (TemplateResult | typeof nothing)[] | TemplateResult | typeof nothing;
    protected renderMiddleSlot(): (TemplateResult | typeof nothing)[] | TemplateResult | typeof nothing;
    protected renderBottomSlot(): (TemplateResult | typeof nothing)[] | TemplateResult | typeof nothing;
    protected renderLists(): TemplateResult | typeof nothing;
    protected renderCloudFiles(): TemplateResult | typeof nothing;
    protected render(): TemplateResult<1>;
}
//# sourceMappingURL=wy-editor.d.ts.map