import { type ReactElement, type ReactNode, type Ref, type RefObject } from 'react'; import type { AccessibilityRole, AccessibilityState } from 'react-native'; import type { SharedValue } from 'react-native-reanimated'; import { type ICarouselInstance, type TCarouselProps } from 'react-native-reanimated-carousel'; export type CarouselRef = ICarouselInstance; /** * Full passthrough of `react-native-reanimated-carousel`'s own props (per `01-api-design.md`, * Resolved Question #1) — re-exported under a Forge-owned name so consumers never import the * adopted library directly. A type alias (not `interface extends`) because `TCarouselProps` * is itself a union-containing type (vertical/mode discriminants), which interfaces cannot extend. */ export type CarouselProps = TCarouselProps & { className?: string; /** Rendered inside the carousel's progress-sharing provider — use to compose `Carousel.Pagination`. */ children?: ReactNode; }; declare const CarouselRoot: (props: CarouselProps & { ref?: Ref; }) => ReactElement | null; export interface CarouselPaginationItemAccessibilityOverrides { accessibilityLabel?: string; accessibilityHint?: string; accessibilityRole?: AccessibilityRole; accessibilityState?: AccessibilityState; } export interface CarouselPaginationProps { /** Carousel items — must be the same array (or same length) passed to `Carousel`'s `data`. */ data: T[]; /** Lay dots out vertically instead of horizontally. @default true (horizontal) */ horizontal?: boolean; /** Custom content per dot; defaults to the library's built-in dot rendering. */ renderItem?: (item: T, index: number) => ReactNode; /** Dot size in pixels (both width and height). */ size?: number; /** Included in the default accessibility label, e.g. `"Slide 1 of 4 - {carouselName}"`. */ carouselName?: string; /** Per-dot accessibility overrides. Defaults to `"Slide N of M"` / `"Go to Slide N of M"`. */ paginationItemAccessibility?: (index: number, length: number) => CarouselPaginationItemAccessibilityOverrides; className?: string; /** Explicit progress value — only required when rendered outside `` (sibling composition). */ progress?: SharedValue; /** Explicit carousel ref for the default press-to-navigate behavior — only required outside ``. */ carouselRef?: RefObject; /** * Mirrors `Carousel`'s `loop` prop for shortest-path dot navigation. * Defaults to `true` (same as `Carousel`) when omitted outside context. */ loop?: boolean; /** Overrides the default press-to-navigate behavior (`scrollTo({ index })`). */ onPress?: (index: number) => void; } declare const CarouselPagination: (props: CarouselPaginationProps) => ReactElement | null; type CarouselCompoundComponent = typeof CarouselRoot & { Pagination: typeof CarouselPagination; }; export declare const Carousel: CarouselCompoundComponent; export interface UseCarouselOptions { /** Seed `progress` to match `Carousel`'s `defaultIndex` in sibling composition. @default 0 */ defaultIndex?: number; } export declare function useCarousel(options?: UseCarouselOptions): { ref: RefObject; /** Bind to `Carousel`'s `onProgressChange` and sibling `Carousel.Pagination`'s `progress`. */ progress: SharedValue; next: (opts?: Parameters[0]) => void | undefined; prev: (opts?: Parameters[0]) => void | undefined; scrollTo: (opts?: Parameters[0]) => void | undefined; }; export {}; //# sourceMappingURL=index.d.ts.map