// Type declarations for the vendored page-flip ESM bundle (./index.js).
// Library: https://github.com/Nodlik/StPageFlip — MIT, vendored at v2.0.7.

export interface FlipEvent {
  data: unknown;
  object: PageFlip;
}

export interface PageFlipSettings {
  startPage?: number;
  size?: 'fixed' | 'stretch';
  width?: number;
  height?: number;
  minWidth?: number;
  maxWidth?: number;
  minHeight?: number;
  maxHeight?: number;
  drawShadow?: boolean;
  flippingTime?: number;
  usePortrait?: boolean;
  startZIndex?: number;
  autoSize?: boolean;
  maxShadowOpacity?: number;
  showCover?: boolean;
  mobileScrollSupport?: boolean;
  clickEventForward?: boolean;
  useMouseEvents?: boolean;
  swipeDistance?: number;
  showPageCorners?: boolean;
  disableFlipByClick?: boolean;
}

export class PageFlip {
  constructor(element: HTMLElement, settings: PageFlipSettings);
  loadFromImages(urls: string[]): void;
  loadFromHTML(elements: HTMLElement[] | NodeListOf<HTMLElement>): void;
  flipNext(): void;
  flipPrev(): void;
  destroy(): void;
  update(): void;
  getCurrentPageIndex(): number;
  getPageCount(): number;
  on(event: 'flip' | 'init' | 'update' | 'changeOrientation' | 'changeState', cb: (e: FlipEvent) => void): void;
  off(event: string, cb: (e: FlipEvent) => void): void;
}
