import '../styles/styles.css'; export declare class GUI { videoElement: HTMLVideoElement; canvasElement: HTMLCanvasElement; canvasContext: CanvasRenderingContext2D; headingElement: HTMLHeadingElement; parentElement: HTMLDivElement; buttonElement: HTMLButtonElement; overlayHeading: HTMLHeadingElement; audio: HTMLAudioElement; optionElement: HTMLOptionElement; selectElement: HTMLSelectElement; static videoElement_Id: string; static videoClass: string; static parentClass: string; static captureElementClass: string; static overlayHeadingClass: string; static heading_class: string; static error_class: string; static loader_class: string; constructor(); playVideo: () => Promise; /** * This function setup a Video Element for capturing Image * @param rootElement - The rootElement Data to Setup Camera */ setUpVideoElement: (rootElement: HTMLElement) => void; /** * This function creates a Canvas after the camera access is allowed. * @returns - canvas element */ getCanvas: () => HTMLCanvasElement; /** * This function creates a Canvas Context data for capturing Image. * @returns - canvas context */ createCanvasContext: () => CanvasRenderingContext2D; /** * This method is used to draw image on Canvas. * @param dimensions - The dimensions of the video element or data need to be capture. * @returns - Promise containing the image data */ drawImageOnCanvas: (dimensions?: any) => Promise; /** * Method calculate the scan region data for capture image * @returns - Scan Region */ calculateScanRegion: () => { x: number; y: number; width: number; height: number; }; /** * This method is use to add the Button element to the overlay along with its functions. * @param heading - The heading of the div element. * @returns - Promise which resolves to back image. */ addHeadingToOverlay: (heading: string) => Promise; /** * This method is use to add the Button element to the overlay along with its functions. * @param dimensions - The dimensions data which is needed to be cropped for image * @param onClickFunction - The onclick function when the user element is triggered. * @returns buttonElement - The button element. */ addButtonToOverlay: (onClickFunction: any, dimensions?: { width: number; height: number; }, startCapture?: any) => HTMLButtonElement; /** * This method is used to change the button Context after capture * @param {*} code - Code for the button Available codes 0 -front,1-back */ changeButtonContext: (code: number) => Promise; /** * This method is called when all scanning is complete * @param pauseFunction - Function call to pause the camera */ closeCaptureElement: (pauseFunction: () => void) => void; /** * This method is called when all scanning is complete * @param resetFunction - Function call to pause the camera */ resetCamera: (resetFunction: () => void) => Promise; /** * This method is used to create the capture element. * @param dimensions - The dimensions of the capture element as specified by the user. * @param onClickFunction - The onclick function which executes on click. */ createCaptureElement: (onClickFunction: any, dimensions: { width: number; height: number; }, captureFunction: any) => void; /** * This element creates a loader for the camera component * @param rootElement */ createLoader: (rootElement: HTMLElement) => void; /** * This function removes the loader element created previously */ removeLoader: () => void; /** * This method displays an error overlay for any errors occured in checking * license key and camera initialization. * @param errorMessage - The error message data */ createErrorOverlay: (errorMessage: string) => void; /** * This method is used to get the image Data from the canvas * @returns - Promise which resolves to image data */ getImageData: () => Promise; }