import GcPdfViewer from "..";
import { AnnotationBase } from "../Annotations/AnnotationTypes";
import { OpenParameters } from "./ViewerTypes";
/**
 * Event name.
 **/
export type EventName = "ErrorEvent" | "BeforeOpenEvent" | "AfterOpenEvent" | "ThemeChangedEvent" | "BeforeAddAnnotation" | "AfterAddAnnotation" | "BeforeUpdateAnnotation" | "AfterUpdateAnnotation" | "BeforeRemoveAnnotation" | "AfterRemoveAnnotation";
/**
 * Base type for event arguments.
 **/
export type EventArgs = {
    /**
     * Event name.
     **/
    eventName?: EventName;
    /**
     * Event source.
     **/
    source?: GcPdfViewer;
};
/**
 * Base type for cancelable event arguments.
 **/
export type CancelEventArgs = {
    /**
     * Indicates whether the event should be canceled.
     **/
    cancel?: boolean;
} & EventArgs;
/**
 * Error event arguments.
 **/
export type ErrorEventArgs = {
    /**
     * Message.
     **/
    readonly message: string;
    /**
     * Event type
     **/
    readonly type: 'open' | string;
    /**
     * Exception object.
     **/
    readonly exception?: any;
} & EventArgs;
/**
 * Before open event arguments.
 **/
export type BeforeOpenEventArgs = {
    /**
     * Payload data.
     **/
    readonly payload: Uint8Array | string;
    /**
     * Open parameters.
     **/
    readonly openParameters?: OpenParameters;
    /**
     * Payload data type.
     **/
    readonly type: 'binary' | 'url';
} & EventArgs;
/**
 * After open event arguments.
 **/
export type AfterOpenEventArgs = {} & EventArgs;
/**
 * Theme changed event arguments.
 **/
export type ThemeChangedEventArgs = {
    /**
     * Theme name.
     **/
    readonly theme: string;
} & EventArgs;
/**
 * Base type  annotation event arguments.
 **/
export type BaseAnnotationEventArgs = {
    /**
     * Page index.
     **/
    pageIndex: number;
    /**
     * Annotation object.
     **/
    annotation: AnnotationBase;
} & EventArgs;
/**
 * Base annotation cancelable event arguments.
 **/
export type BaseAnnotationCancelEventArgs = {} & BaseAnnotationEventArgs & CancelEventArgs;
/**
 * BeforeAddAnnotation event arguments.
 **/
export type BeforeAddAnnotationEventArgs = {
    annotationElement?: HTMLElement;
} & BaseAnnotationCancelEventArgs;
/**
 * AfterAddAnnotation event arguments.
 **/
export type AfterAddAnnotationEventArgs = {} & BaseAnnotationEventArgs;
/**
 * BeforeUpdateAnnotation event arguments.
 **/
export type BeforeUpdateAnnotationEventArgs = {} & BaseAnnotationCancelEventArgs;
/**
 * AfterUpdateAnnotation event arguments.
 **/
export type AfterUpdateAnnotationEventArgs = {} & BaseAnnotationEventArgs;
/**
 * BeforeRemoveAnnotation event arguments.
 **/
export type BeforeRemoveAnnotationEventArgs = {} & BaseAnnotationCancelEventArgs;
/**
 * AfterRemoveAnnotation event arguments.
 **/
export type AfterRemoveAnnotationEventArgs = {} & BaseAnnotationEventArgs;
