/**
 * Copyright (c) Microblink Ltd. All rights reserved.
 */
import { EventEmitter } from '../stencil-public-runtime';
import * as BlinkIDImageCaptureSDK from '../../../es/blinkid-imagecapture-sdk';
export interface MicroblinkUI {
  allowHelloMessage: boolean;
  engineLocation: string;
  licenseKey: string;
  wasmType: string;
  rawRecognizers: string;
  recognizers: Array<string>;
  recognizerOptions: {
    [key: string]: any;
  };
  recognitionTimeout?: number;
  includeSuccessFrame?: boolean;
  thoroughScanFromImage: boolean;
  enableDrag: boolean;
  hideFeedback: boolean;
  hideLoadingAndErrorUi: boolean;
  scanFromCamera: boolean;
  scanFromImage: boolean;
  translations: {
    [key: string]: string;
  };
  rawTranslations: string;
  galleryOverlayType: 'FULLSCREEN' | 'INLINE';
  galleryDropType: 'FULLSCREEN' | 'INLINE';
  showActionLabels: boolean;
  showModalWindows: boolean;
  showScanningLine?: boolean;
  showCameraFeedbackBarcodeMessage?: boolean;
  iconCameraDefault: string;
  iconCameraActive: string;
  iconGalleryDefault: string;
  iconGalleryActive: string;
  iconInvalidFormat: string;
  iconSpinnerScreenLoading: string;
  iconSpinnerFromGalleryExperience: string;
  iconGalleryScanningCompleted: string;
  fatalError: EventEmitter<EventFatalError>;
  ready: EventEmitter<EventReady>;
  scanError: EventEmitter<EventScanError>;
  scanSuccess: EventEmitter<EventScanSuccess>;
  cameraScanStarted: EventEmitter<null>;
  imageScanStarted: EventEmitter<null>;
  setUiState: (state: 'ERROR' | 'LOADING' | 'NONE' | 'SUCCESS') => Promise<any>;
  setUiMessage: (state: 'FEEDBACK_ERROR' | 'FEEDBACK_INFO' | 'FEEDBACK_OK', message: string) => Promise<any>;
}
export interface SdkSettings {
  allowHelloMessage: boolean;
  engineLocation: string;
  wasmType?: BlinkIDImageCaptureSDK.WasmType;
}
/**
 * Events
 */
export declare class EventFatalError {
  code: Code;
  message: string;
  details?: any;
  constructor(code: Code, message: string, details?: any);
}
export declare class EventReady {
  sdk: BlinkIDImageCaptureSDK.WasmSDK;
  constructor(sdk: BlinkIDImageCaptureSDK.WasmSDK);
}
export declare class EventScanError {
  code: Code;
  fatal: boolean;
  message: string;
  recognizerName: string;
  constructor(code: Code, fatal: boolean, message: string, recognizerName: string);
}
export declare class EventScanSuccess {
  recognizer: BlinkIDImageCaptureSDK.RecognizerResult;
  recognizerName: string;
  successFrame?: BlinkIDImageCaptureSDK.SuccessFrameGrabberRecognizerResult;
  constructor(recognizer: BlinkIDImageCaptureSDK.RecognizerResult, recognizerName: string, successFrame?: BlinkIDImageCaptureSDK.SuccessFrameGrabberRecognizerResult);
}
export interface RecognitionResults {
  recognizer: BlinkIDImageCaptureSDK.RecognizerResult;
  successFrame?: BlinkIDImageCaptureSDK.SuccessFrameGrabberRecognizerResult;
}
/**
 * Error codes
 */
export declare enum Code {
  BrowserNotSupported = "BROWSER_NOT_SUPPORTED",
  EmptyResult = "EMPTY_RESULT",
  InvalidRecognizers = "INVALID_RECOGNIZERS",
  InvalidRecognizerOptions = "INVALID_RECOGNIZER_OPTIONS",
  MissingLicenseKey = "MISSING_LICENSE_KEY",
  NoImageFileFound = "NO_IMAGE_FILE_FOUND",
  NoFirstImageFileFound = "NO_FIRST_IMAGE_FILE_FOUND",
  NoSecondImageFileFound = "NO_SECOND_IMAGE_FILE_FOUND",
  SdkLoadFailed = "SDK_LOAD_FAILED",
  GenericScanError = "GENERIC_SCAN_ERROR",
  CameraNotAllowed = "CAMERA_NOT_ALLOWED",
  CameraInUse = "CAMERA_IN_USE",
  CameraGenericError = "CAMERA_GENERIC_ERROR",
  InternetNotAvailable = "INTERNET_NOT_AVAILABLE",
  LicenseError = "LICENSE_ERROR"
}
/**
 * Scan structures
 */
export declare const AvailableRecognizers: {
  [key: string]: string;
};
export interface VideoRecognitionConfiguration {
  recognizers: Array<string>;
  recognizerOptions?: any;
  recognitionTimeout?: number;
  successFrame: boolean;
  cameraFeed: HTMLVideoElement;
  cameraId: string | null;
}
export interface ImageRecognitionConfiguration {
  recognizers: Array<string>;
  recognizerOptions?: any;
  thoroughScan?: boolean;
  file: File;
}
export interface CombinedImageRecognitionConfiguration {
  recognizers: Array<string>;
  recognizerOptions?: any;
  thoroughScan?: boolean;
  firstFile: File;
  secondFile: File;
}
export declare enum ImageRecognitionType {
  Single = "Single",
  Combined = "Combined"
}
export declare enum CombinedImageType {
  First = "First",
  Second = "Second"
}
export interface RecognizerInstance {
  name: string;
  recognizer: BlinkIDImageCaptureSDK.Recognizer & {
    objectHandle: number;
  };
  successFrame?: BlinkIDImageCaptureSDK.SuccessFrameGrabberRecognizer<BlinkIDImageCaptureSDK.Recognizer> & {
    objectHandle?: number;
  };
}
export declare enum RecognitionStatus {
  NoImageFileFound = "NoImageFileFound",
  NoFirstImageFileFound = "NoFirstImageFileFound",
  NoSecondImageFileFound = "NoSecondImageFileFound",
  Preparing = "Preparing",
  Ready = "Ready",
  Processing = "Processing",
  DetectionFailed = "DetectionFailed",
  EmptyResultState = "EmptyResultState",
  OnFirstSideResult = "OnFirstSideResult",
  ScanSuccessful = "ScanSuccessful",
  DocumentClassified = "DocumentClassified",
  DetectionStatusChange = "DetectionStatusChange",
  NoSupportForMediaDevices = "NoSupportForMediaDevices",
  CameraNotFound = "CameraNotFound",
  CameraNotAllowed = "CameraNotAllowed",
  UnableToAccessCamera = "UnableToAccessCamera",
  CameraInUse = "CameraInUse",
  CameraGenericError = "CameraGenericError",
  UnknownError = "UnknownError",
  DetectionStatusFail = "Fail",
  DetectionStatusSuccess = "Success",
  DetectionStatusCameraTooHigh = "CameraTooHigh",
  DetectionStatusFallbackSuccess = "FallbackSuccess",
  DetectionStatusPartial = "Partial",
  DetectionStatusCameraAtAngle = "CameraAtAngle",
  DetectionStatusCameraTooNear = "CameraTooNear",
  DetectionStatusDocumentTooCloseToEdge = "DocumentTooCloseToEdge"
}
export interface RecognitionEvent {
  status: RecognitionStatus;
  data?: any;
}
export interface RecognitionResults {
  recognizer: BlinkIDImageCaptureSDK.RecognizerResult;
  recognizerName: string;
  successFrame?: BlinkIDImageCaptureSDK.SuccessFrameGrabberRecognizerResult;
  imageCapture?: boolean;
  resultJSON?: any;
}
export declare enum CameraExperience {
  Barcode = "BARCODE",
  CardCombined = "CARD_COMBINED",
  CardSingleSide = "CARD_SINGLE_SIDE",
  PaymentCard = "PAYMENT_CARD"
}
export declare enum CameraExperienceState {
  AdjustAngle = "AdjustAngle",
  Classification = "Classification",
  Default = "Default",
  Detection = "Detection",
  Done = "Done",
  DoneAll = "DoneAll",
  Flip = "Flip",
  MoveCloser = "MoveCloser",
  MoveFarther = "MoveFarther"
}
export declare const CameraExperienceStateDuration: Map<CameraExperienceState, number>;
export declare enum CameraExperienceReticleAnimation {
  Default = 0,
  Detection = 1,
  Classification = 2
}
/**
 * User feedback structures
 */
export declare enum FeedbackCode {
  CameraDisabled = "CAMERA_DISABLED",
  CameraGenericError = "CAMERA_GENERIC_ERROR",
  CameraInUse = "CAMERA_IN_USE",
  CameraNotAllowed = "CAMERA_NOT_ALLOWED",
  GenericScanError = "GENERIC_SCAN_ERROR",
  ScanStarted = "SCAN_STARTED",
  ScanUnsuccessful = "SCAN_UNSUCCESSFUL",
  ScanSuccessful = "SCAN_SUCCESSFUL"
}
export interface FeedbackMessage {
  code?: FeedbackCode;
  state: 'FEEDBACK_ERROR' | 'FEEDBACK_INFO' | 'FEEDBACK_OK';
  message: string;
}
/**
 * Camera selection
 */
export interface CameraEntry {
  prettyName: string;
  details: BlinkIDImageCaptureSDK.SelectedCamera;
}
