///
//@ts-ignore
import React, { Component } from 'react';
import { PageToolsPlugin } from './PageToolsPlugin';
///
//@ts-ignore
import { i18n } from 'i18next';
import { Bounds, IGcSelectionBox, SelectionBoundsChangedParams } from '../../ImageViewer/Models/SelectionBoxTypes';
import { IViewerTransactionSupport } from '../../ImageViewer/Models/IViewerTransactionSupport';
/**
* Crop toolbar state model.
**/
export declare type CropToolbarState = {
hidden?: boolean;
x?: number | any;
y?: number | any;
width?: number | any;
height?: number | any;
aspectRatio?: AspectRatioType;
};
/**
* Crop toolbar properties.
**/
export declare type CropToolbarProps = {
pageToolsPlugin: PageToolsPlugin;
hidden?: boolean;
};
export declare type AspectRatioType = "Custom" | "Original" | "9_12" | "1_1" | "5_4" | "4_3" | "3_2" | "16_9";
/**
* Crop panel.
**/
export declare class CropToolbar extends Component implements IViewerTransactionSupport {
static instances: {
[id: string]: CropToolbar | null;
};
private _isMounted;
private _onZoomChangedEventBusHandler?;
constructor(props: any, context: any);
get in17n(): i18n;
get isMounted(): boolean;
get selectionBox(): IGcSelectionBox;
get viewer(): import("../..").IImageViewer;
/**
* The maximum canvas area size in pixels.
* @ignore exclude from docs.
**/
get maxImageSize(): {
width: number;
height: number;
};
/**
* Max possible crop width.
**/
get maxWidth(): number;
/**
* Max possible crop height.
**/
get maxHeight(): number;
/**
* Crop x position.
**/
getX(): number;
setX(x: number, checkBounds?: boolean): void;
/**
* Crop y position.
**/
getY(): number;
setY(y: number, checkBounds?: boolean): void;
/**
* Crop width.
**/
getWidth(): number;
set width(width: number | string);
/**
* Crop height.
**/
getHeight(): number;
set height(height: number);
adjustAspectRatio(changedSide?: "height" | "width"): boolean;
/**
* Natural aspect ratio.
**/
get naturalRatio(): number;
/**
* Show toolbar.
* @param pageToolsPlugin
*/
static showDialog(pageToolsPlugin: PageToolsPlugin): void;
/**
* Show toolbar.
**/
show(): void;
private _bindEvents;
private _unbindEvents;
resetValues(): void;
/**
* Hide toolbar
**/
hide(): void;
onSelectionBoundsChanged(selection: Bounds, params: SelectionBoundsChangedParams): void;
get keepAspectRatio(): boolean;
showSelectionBox(): void;
updateSelectionBox(): void;
hideSelectionBox(): void;
componentWillUnmount(): void;
componentDidMount(): void;
confirmChanges(): void;
cancelChanges(): void;
/**
* Undo viewer transaction step. Return true if undo operation is consumed.
**/
undoTransactionStep(): boolean | void;
/**
* Redo viewer transaction step. Return true if redo operation is consumed.
**/
redoTransactionStep(): boolean | void;
render(): React.JSX.Element | null;
isSizeCorrect(): boolean;
apply(): void;
}