import type { LitElement } from 'lit';
import type { ValidationResult } from './validateMedia.js';
/**
 * This entire file was copied from shreddit
 * I removed some parts of it that were too "shreddit post creation" focused, but kept the original code style
 * Eventually we will remove it in favour of faceplate-ui image upload component, but for now we have this
 */
interface UploadResponse {
    url?: string;
    mediaId?: string;
    error?: string;
}
export type MediaValue = {
    mediaId: string;
    url: string;
    caption?: string;
    outboundUrl?: string;
    posterUrl?: string;
    isGif?: boolean;
};
export type MediaItem = {
    id: string;
    file?: File;
    type?: 'still' | 'video';
    src?: string;
    posterSrc?: string;
    status?: MediaStatus;
    validationResult?: ValidationResult;
    mediaResponse?: Promise<UploadResponse>;
    posterResponse?: Promise<UploadResponse>;
    value?: MediaValue;
    width?: number;
    height?: number;
};
export declare enum MediaStatus {
    loading = "loading",
    success = "success"
}
export declare enum PostType {
    image = "image"
}
type ValidationCallback = (message: string) => void;
type MediaControllerOptions = {
    setValidation?: ValidationCallback;
};
export declare const MAX_FILE_COUNT = 20;
export declare class MediaController {
    #private;
    media: MediaItem[];
    constructor(host: LitElement, options?: MediaControllerOptions);
    getValue(): string;
    setValue(newValue: string): void;
    handleMedia(files: File[]): Promise<void>;
    getPostType(): PostType;
    hasLoadingMedia(): boolean;
    removeMedia(index: number): void;
}
export declare const UPLOAD_ERROR_VALIDATION_MESSAGE = "Media upload failed";
export declare const UPLOAD_IN_PROGRESS_VALIDATION_MESSAGE = "Image upload is in progress";
export {};
//# sourceMappingURL=media-controller.d.ts.map