/**
 * @license
 * Copyright ASW (A Software World) All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file
 */
import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { DomSanitizer, SafeStyle, SafeUrl } from '@angular/platform-browser';
import { CropperPosition, Dimensions, ImageCroppedEvent, ImageTransform, LoadedImage, MoveTypes, OutputFormat } from '@asoftwareworld/form-builder-pro/api';
import { CropService } from './services/crop.service';
import { CropperPositionService } from './services/cropper-position.service';
import { LoadImageService } from './services/load-image.service';
import * as i0 from "@angular/core";
export declare class AswImageCropComponent implements OnChanges, OnInit, OnDestroy {
    private cropService;
    private cropperPositionService;
    private loadImageService;
    private sanitizer;
    private cd;
    private ngZone;
    private Hammer;
    private settings;
    private setImageMaxSizeRetries;
    private moveStart?;
    private loadedImage?;
    private mouseAndTouchmoveSubscription;
    safeImgDataUrl?: SafeUrl | string;
    safeTransformStyle?: SafeStyle | string;
    marginLeft: SafeStyle | string;
    maxSize: Dimensions;
    moveTypes: typeof MoveTypes;
    imageVisible: boolean;
    wrapper: ElementRef<HTMLDivElement>;
    sourceImage: ElementRef<HTMLDivElement>;
    imageChangedEvent?: any;
    imageURL?: string;
    imageBase64?: string;
    imageFile?: File;
    format: OutputFormat;
    transform: ImageTransform;
    maintainAspectRatio: boolean;
    aspectRatio: number;
    resizeToWidth: number;
    resizeToHeight: number;
    cropperMinWidth: number;
    cropperMinHeight: number;
    cropperMaxHeight: number;
    cropperMaxWidth: number;
    cropperStaticWidth: number;
    cropperStaticHeight: number;
    canvasRotation: number;
    initialStepSize: number;
    roundCropper: boolean;
    onlyScaleDown: boolean;
    imageQuality: number;
    autoCrop: boolean;
    backgroundColor: string;
    containWithinAspectRatio: boolean;
    hideResizeSquares: boolean;
    allowMoveImage: boolean;
    cropper: CropperPosition;
    alignImage: 'left' | 'center';
    disabled: boolean;
    imageCropped: EventEmitter<ImageCroppedEvent>;
    startCropImage: EventEmitter<void>;
    imageLoaded: EventEmitter<LoadedImage>;
    cropperReady: EventEmitter<Dimensions>;
    loadImageFailed: EventEmitter<void>;
    transformChange: EventEmitter<ImageTransform>;
    constructor(cropService: CropService, cropperPositionService: CropperPositionService, loadImageService: LoadImageService, sanitizer: DomSanitizer, cd: ChangeDetectorRef, ngZone: NgZone);
    ngOnChanges(changes: SimpleChanges): void;
    private onChangesUpdateSettings;
    private onChangesInputImage;
    private isValidImageChangedEvent;
    private setCssTransform;
    ngOnInit(): void;
    private reset;
    private loadImageFile;
    private loadBase64Image;
    private loadImageFromURL;
    private setLoadedImage;
    private loadImageError;
    imageLoadedInView(): void;
    private checkImageMaxSizeRecursively;
    private sourceImageLoaded;
    onResize(): void;
    private activatePinchGesture;
    private resizeCropperPosition;
    resetCropperPosition(): void;
    keyboardAccess(event: KeyboardEvent): void;
    private changeKeyboardStepSize;
    private keyboardMoveCropper;
    startMove(event: any, moveType: MoveTypes, position?: string | null): void;
    startPinch(event: any): void;
    moveImg(event: any): void;
    onPinch(event: any): void;
    private setMaxSize;
    private setCropperScaledMinSize;
    private setCropperScaledMinWidth;
    private setCropperScaledMinHeight;
    private setCropperScaledMaxSize;
    private checkCropperPosition;
    moveStop(): void;
    pinchStop(): void;
    private doAutoCrop;
    crop(): ImageCroppedEvent | null;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AswImageCropComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AswImageCropComponent, "asw-image-crop", never, { "imageChangedEvent": { "alias": "imageChangedEvent"; "required": false; }; "imageURL": { "alias": "imageURL"; "required": false; }; "imageBase64": { "alias": "imageBase64"; "required": false; }; "imageFile": { "alias": "imageFile"; "required": false; }; "format": { "alias": "format"; "required": false; }; "transform": { "alias": "transform"; "required": false; }; "maintainAspectRatio": { "alias": "maintainAspectRatio"; "required": false; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; }; "resizeToWidth": { "alias": "resizeToWidth"; "required": false; }; "resizeToHeight": { "alias": "resizeToHeight"; "required": false; }; "cropperMinWidth": { "alias": "cropperMinWidth"; "required": false; }; "cropperMinHeight": { "alias": "cropperMinHeight"; "required": false; }; "cropperMaxHeight": { "alias": "cropperMaxHeight"; "required": false; }; "cropperMaxWidth": { "alias": "cropperMaxWidth"; "required": false; }; "cropperStaticWidth": { "alias": "cropperStaticWidth"; "required": false; }; "cropperStaticHeight": { "alias": "cropperStaticHeight"; "required": false; }; "canvasRotation": { "alias": "canvasRotation"; "required": false; }; "initialStepSize": { "alias": "initialStepSize"; "required": false; }; "roundCropper": { "alias": "roundCropper"; "required": false; }; "onlyScaleDown": { "alias": "onlyScaleDown"; "required": false; }; "imageQuality": { "alias": "imageQuality"; "required": false; }; "autoCrop": { "alias": "autoCrop"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "containWithinAspectRatio": { "alias": "containWithinAspectRatio"; "required": false; }; "hideResizeSquares": { "alias": "hideResizeSquares"; "required": false; }; "allowMoveImage": { "alias": "allowMoveImage"; "required": false; }; "cropper": { "alias": "cropper"; "required": false; }; "alignImage": { "alias": "alignImage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "imageCropped": "imageCropped"; "startCropImage": "startCropImage"; "imageLoaded": "imageLoaded"; "cropperReady": "cropperReady"; "loadImageFailed": "loadImageFailed"; "transformChange": "transformChange"; }, never, never, false, never>;
}
