import React from 'react'; import { ImageViewProps } from './component'; import { ImageProps } from '../Image'; import { ImageURISource, ImageRequireSource } from 'react-native'; type ImageSource = ImageURISource | ImageRequireSource; type TImage = { source: ImageSource; created: number; id: string; }; /** * Must wrap any tree that uses `useSpotlight`, `useImageSpotlight`, or `Spotlight`. * A single provider can host multiple named spotlights simultaneously — each `name` string * is an isolated namespace, so different image galleries don't interfere. */ export declare const SpotlightProvider: React.FC>; /** * Returns an imperative API — call `open(id)` to display the viewer at the image matching `id`. * The viewer's `imageIndex` is derived by finding the id in the ordered image list, so insertion * order (creation timestamp) determines display order, not registration order. */ export declare function useSpotlight(name: string): { images: TImage[]; currentIndex: number; set(img: ImageSource, id?: string): string; remove(id: string): void; open(id: string): void; close(): void; clear(): void; }; /** * Registers a single image into the named spotlight and returns `onImagePressed`. * Pass `name=null` to opt out without conditionally calling the hook (hook rules safe). * The image is automatically removed from the spotlight when the component unmounts, * so stale images never appear in the gallery after the source component is gone. */ export declare const useImageSpotlight: (name: string | null, src: ImageProps["source"]) => { onImagePressed: () => void; }; export type SpotlightHeaderComponent = { imageIndex: number; spotlight: ReturnType; }; export type SpootlightFooterComponent = React.ComponentType<{ imageIndex: number; imagesLength: number; spotlight: ReturnType; }>; type FooterComponentProps = SpotlightHeaderComponent; export type SpotlightProps = { name?: string; HeaderComponent?: (props: SpotlightHeaderComponent) => React.ReactElement; FooterComponent?: (props: FooterComponentProps) => React.ReactElement; showFooter?: boolean; } & ImageViewProps; export declare const Spotlight: (props: SpotlightProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=Spotlight.d.ts.map