import { Klass, LexicalCommand, LexicalEditor, LexicalNode } from 'lexical';
import { ReactNode, RefObject } from 'react';
export type AlignmentType = 'left' | 'center' | 'right';
export type VideoPlatform = 'youtube' | 'vk' | 'rutube' | 'download' | 'upload' | 'unknown' | 'link';
export interface ResizableContainerProps {
    editor: LexicalEditor;
    isIcon?: boolean;
    isEmbed?: boolean;
    width: number | string | 'inherit';
    height: number | string | 'inherit';
    onResizeEnd: (width: number | string | 'inherit', height: number | string | 'inherit') => void;
    alignment?: AlignmentType | string;
    type?: string;
    disableInteractions?: boolean;
    children: React.ReactElement;
}
export interface AlignmentProps {
    opened: boolean;
    setOpened: (opened: boolean) => void;
    t: (key: string) => string;
    editor: LexicalEditor;
    nodeKey?: string;
    setShown?: (value: boolean) => void;
    isShown?: boolean;
}
export interface IconProps {
    name: string;
    size?: number | string;
    iconStyle?: React.CSSProperties;
    [key: string]: any;
}
export interface ImperativeHandle {
    insertVideos?: (files: File[]) => void;
    [key: string]: unknown;
}
export interface VideoPluginConfig {
    pageId?: string;
    maxFileSize?: number;
    imperativeHandleRef?: RefObject<ImperativeHandle>;
}
export interface VideoPluginDependencies {
    createMediaComponent: (node: LexicalNode) => void;
    deleteNode: (editor: LexicalEditor, nodeKey: string) => void;
    ResizableContainer: React.ComponentType<any>;
    AlignmentComponent?: React.ComponentType<any>;
    Icon?: React.ComponentType<any>;
    showErrorNotification?: (opts: {
        message: string;
    }) => void;
    showMessageNotification?: (opts: {
        message: string;
    }) => void;
}
export type VideoApiErrorSource = 'init' | 'upload' | 'status' | 'cover' | 'subtitles' | 'chapters' | 'retry' | 'unknown';
export interface VideoApiError {
    status: number;
    statusText: string;
    message: string;
    data?: unknown;
    source: VideoApiErrorSource;
    videoId?: string;
}
export interface VideoPluginCallbacks {
    onUploadStateChange?: (isUploading: boolean, uploadingCount: number) => void;
    onError?: (error: VideoApiError) => void;
}
export interface VideoPluginOptions {
    config: VideoPluginConfig;
    dependencies: VideoPluginDependencies;
    callbacks?: VideoPluginCallbacks;
}
export interface SlashMenuConfig {
    parentKey: string;
    name: string;
    description: string;
    hint?: string;
    keywords: string[];
    icon: ReactNode;
    command: LexicalCommand<string>;
    commandPayload: string;
}
export interface PluginModeConfig {
    comment: boolean;
    default: boolean;
    editor: boolean;
}
export interface PluginConfig {
    key: string;
    node: Klass<LexicalNode>;
    Plugin: React.ComponentType;
    Provider: React.ComponentType<{
        children: ReactNode;
    }>;
    slashMenu: SlashMenuConfig;
    modes?: PluginModeConfig;
}
export type UploadState = 'default' | 'hover' | 'focus' | 'upload' | 'error-size-limit' | 'error-format' | 'error-interrupted' | 'error-offset-mismatch' | 'error-stall' | 'analysis' | 'conversion' | 'video-preview';
export type ErrorType = 'size-limit' | 'format' | 'interrupted' | 'offset-mismatch' | 'stall';
export interface UploadProgress {
    percent: number;
    uploaded: number;
    total: number;
    speed: number;
    remaining: number;
}
export interface VideoThumbnail {
    url: string;
    timestamp: number;
    selected?: boolean;
}
export interface VideoUploadProps {
    onFileSelect: (file: File) => void;
    onUploadComplete: (url: string, id: string) => void;
    onError: (error: ErrorType) => void;
    maxFileSize: number;
    nodeKey: string;
    editor: LexicalEditor;
}
export interface TranscodingProgress {
    percent: number;
    stage: 'analysis' | 'conversion';
    remaining?: number;
}
export interface InitResponse {
    videoId: string;
    sourceAttachmentId: string;
    statusUrl?: string;
    status?: VideoStatus;
}
export interface UploadChunkResponse {
    nextOffset?: number;
    expectedOffset?: number;
}
export interface VideoSubtitleTrack {
    id: string;
    lang?: string;
    label?: string;
    kind?: string;
    isDefault?: boolean;
    url?: string;
    createdAt?: string;
    fileName?: string;
}
export interface VideoStatus {
    state: 'UPLOADING' | 'PROCESSING' | 'READY' | 'FAILED';
    upload?: {
        nextOffset?: number;
    };
    file?: {
        bytesTotal?: number;
    };
    processing?: {
        stage?: 'QUEUED' | 'PROXY_LQ' | 'TRANSCODING' | 'PACKAGING' | 'THUMBNAILS';
        percent?: number;
        message?: string;
    };
    failure?: {
        message?: string;
        reason?: string;
        actions?: Array<{
            type: string;
            label: string;
            url?: string;
        }>;
    };
    previews?: Array<{
        id: string;
        url: string;
        order?: number;
    }>;
    cover?: {
        previewId?: string;
        url?: string;
    };
    playback?: {
        primaryUrl?: string;
        rawUrl?: string;
        fallbackUrl?: string;
        downloadUrl?: string;
        mime?: string;
        supportsRange?: boolean;
        playable?: boolean;
        optimizedReady?: boolean;
        rawPlayable?: boolean;
        proxyReady?: boolean;
        proxyLowReady?: boolean;
    };
    storyboard?: {
        ready?: boolean;
        vttUrl?: string;
        metaUrl?: string;
    };
    chapters?: Array<{
        startSec: number;
        title: string;
        auto?: boolean;
        thumb?: {
            sheetUrl?: string;
            x?: number;
            y?: number;
            w?: number;
            h?: number;
        };
    }>;
    subtitles?: VideoSubtitleTrack[];
}
export interface StoryboardMeta {
    durationSec?: number;
}
export interface StoryboardCue {
    start: number;
    end: number;
    sheetUrl: string;
    x: number;
    y: number;
    w: number;
    h: number;
}
export interface StoryboardFrame extends StoryboardCue {
    sheetWidth?: number;
    sheetHeight?: number;
}
//# sourceMappingURL=index.d.ts.map