import React, { type Ref } from 'react'; import type { Identifier } from '@atlaskit/media-client/identifier'; import type { MediaFeatureFlags } from '@atlaskit/media-common/types'; import type { WithShowControlMethodProp } from '@atlaskit/media-ui/types'; import { type MediaViewerExtensions } from './components/types'; import { type ViewerOptionsProps } from './viewerOptions'; export type Props = Readonly<{ onClose?: () => void; onNavigationChange?: (selectedItem: Identifier) => void; /** * If provided, the List delegates the decision to advance to the next/prev * item to the consumer. The consumer must call `proceed()` to actually * commit the navigation. If `proceed` is never called, the underlying * displayed item does not change. Used by consumers that need to show a * confirmation prompt (e.g. unsaved comment changes) before allowing * navigation between media items. */ onNavigationRequest?: (selectedItem: Identifier, proceed: () => void) => void; defaultSelectedItem: Identifier; items: Identifier[]; extensions?: MediaViewerExtensions; onSidebarButtonClick?: () => void; isSidebarVisible?: boolean; contextId?: string; featureFlags?: MediaFeatureFlags; viewerOptions?: ViewerOptionsProps; fallbackMediaNameFetcher?: (id: string) => Promise; onHeaderClose?: () => void; sidebarToggleRef?: Ref; } & WithShowControlMethodProp>; export type State = { selectedItem: Identifier; previewCount: number; isArchiveSideBarVisible: boolean; }; export declare const List: ({ defaultSelectedItem, onClose, showControls, extensions, onSidebarButtonClick, contextId, featureFlags, isSidebarVisible, onNavigationChange, onNavigationRequest, items, viewerOptions, fallbackMediaNameFetcher, onHeaderClose, sidebarToggleRef, }: Props) => React.JSX.Element;