import React, { useMemo } from 'react' import CarouselNav from './CarouselNav' import { filenameFromUrl } from './fileMeta' import { useCarousel } from './useCarousel' import ViewerShell from './ViewerShell' export interface PdfViewerItem { /** Source URL of the PDF document. */ src: string /** Filename used as the dialog's accessible name. */ filename?: string } export interface PdfViewerProps { open: boolean items: PdfViewerItem[] /** Index to display when the viewer first opens. Defaults to `0`. */ initialIndex?: number onClose: () => void } /** * Modal PDF viewer that hosts the active document inside a sandboxed * `