import { VegaSlimmer } from '../../../../vega-slimmer/vega-slimmer-core';
import { VegaImageUploader } from '../../vega-image-uploader';
import { VegaFile } from '../../types';
import { Nullable } from '../../../../types/general';
/** The `VegaImageUploaderPreviewController` class is responsible for showing a preview of an uploaded image in a modal. */
export declare class VegaImageUploaderPreviewController extends VegaSlimmer {
  value: VegaImageUploader['value'];
  private previewModalRef;
  /**
   * remove preview modal when component destroy
   */
  disconnectedCallback(): void;
  /**
   * The `getImagePreviewURL` method is responsible for generating the URL of the image preview. It
   * checks if `this.value` exists, and if so, it returns the URL of the uploaded file (`(this.value as
   * VegaUploadedFile).url`). If the URL is not available, it falls back to creating a temporary URL
   * using `URL.createObjectURL(this.value as File)`. This temporary URL is used for previewing the
   * image until it is uploaded or saved permanently.
   *
   * @param {VegaFile} [file] the file object which needs to convert to a URL
   * @returns {Nullable<string>} the url of image
   */
  getImagePreviewURL: (file?: VegaFile) => Nullable<string>;
  /**
   * The `showPreview` function displays an image preview in a modal, either by generating a new modal or updating an existing one.
   */
  showPreview(): void;
  /**
   * The `generatePreviewModal` method is a private method of the `VegaImageUploaderPreviewController`
   * class. It is responsible for creating a modal element and appending it to the document body.
   *
   * @param {Nullable<string>} imagePreviewURL the image url
   * @returns {HTMLElement} a preview vega modal
   */
  private generatePreviewModal;
}
