/** * Must be imported from the core package. * @see https://www.embla-carousel.com/api/methods/#typescript */ import type { EmblaCarouselType } from "embla-carousel" import type useEmblaCarousel from "embla-carousel-react" import type { PropsWithChildren } from "react" export type CarouselApi = EmblaCarouselType type UseCarouselParameters = Parameters type CarouselOptions = UseCarouselParameters[0] type CarouselPlugin = UseCarouselParameters[1] export interface CarouselProps extends PropsWithChildren { opts?: CarouselOptions plugins?: CarouselPlugin setApi?: (api: CarouselApi) => void className?: string } export interface CarouselContextProps extends Omit { carouselRef: ReturnType[0] api: ReturnType[1] scrollPrev: () => void scrollNext: () => void canScrollPrev: () => boolean canScrollNext: () => boolean selectedIndex: number } export interface CarouselButtonProps extends React.ButtonHTMLAttributes { className?: string }